MCPcopy Create free account
hub / github.com/chatmail/core / mute

Method mute

python/src/deltachat/chat.py:173–182  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers 2

test_muteMethod · 0.45
test_archived_muted_chatFunction · 0.45

Calls

no outgoing calls

Tested by 2

test_muteMethod · 0.36
test_archived_muted_chatFunction · 0.36