Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Commit 4c34600

Browse files
committed
added a method for turning the chat type into a moderated one
1 parent 1a1480a commit 4c34600

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

skpy/chat.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,17 @@ def setTopic(self, topic):
381381
auth=SkypeConnection.Auth.RegToken, params={"name": "topic"}, json={"topic": topic})
382382
self.topic = topic
383383

384+
def setIsModerateThread(self, moderate=True):
385+
"""
386+
Update the chat type, and make chat moderated. An empty value make chat moderating.
387+
388+
Args:
389+
moderate (bool): moderating value
390+
"""
391+
self.skype.conn("PUT", "{0}/threads/{1}/properties".format(self.skype.conn.msgsHost, self.id),
392+
auth=SkypeConnection.Auth.RegToken, params={"name": "moderatedthread"}, json={"moderatedthread": moderate})
393+
self.moderatedthread = moderate
394+
384395
def setOpen(self, open):
385396
"""
386397
Enable or disable joining by URL. This does not affect current participants inviting others.

0 commit comments

Comments
 (0)