Unmute should also raise exceptions

And tests should not care about return values.
This commit is contained in:
Floris Bruynooghe
2020-02-09 19:11:30 +01:00
parent 0242322d24
commit e525c42c7d
2 changed files with 7 additions and 5 deletions

View File

@@ -114,9 +114,11 @@ class Chat(object):
def unmute(self):
""" unmutes the chat
:returns:
:returns: None
"""
return bool(lib.dc_set_chat_mute_duration(self._dc_context, self.id, 0))
ret = lib.dc_set_chat_mute_duration(self._dc_context, self.id, 0)
if not bool(ret):
raise ValueError("Failed to unmute chat")
def get_mute_duration(self):
""" Returns the number of seconds until the mute of this chat is lifted.