mutes the chat. :param duration: Number of seconds to mute the chat for. None to mute until unmuted again. :returns: None
(self, duration: Optional[int] = None)
| 171 | return json.loads(s) |
| 172 | |
| 173 | def mute(self, duration: Optional[int] = None) -> None: |
| 174 | """mutes the chat. |
| 175 | |
| 176 | :param duration: Number of seconds to mute the chat for. None to mute until unmuted again. |
| 177 | :returns: None |
| 178 | """ |
| 179 | mute_duration = -1 if duration is None else duration |
| 180 | ret = lib.dc_set_chat_mute_duration(self.account._dc_context, self.id, mute_duration) |
| 181 | if not bool(ret): |
| 182 | raise ValueError("Call to dc_set_chat_mute_duration failed") |
| 183 | |
| 184 | def unmute(self) -> None: |
| 185 | """unmutes the chat. |
no outgoing calls