XEP-0045: Add a set_subject() helper
This commit is contained in:
parent
c05cafc963
commit
1e08c90018
1 changed files with 7 additions and 0 deletions
|
@ -229,6 +229,13 @@ class XEP_0045(BasePlugin):
|
|||
self.rooms[room] = {}
|
||||
self.our_nicks[room] = nick
|
||||
|
||||
def set_subject(self, room: JID, subject: str, *, mfrom: Optional[JID] = None):
|
||||
"""Set a room’s subject."""
|
||||
msg = self.xmpp.make_message(room, mfrom=mfrom)
|
||||
msg['type'] = 'groupchat'
|
||||
msg['subject'] = subject
|
||||
msg.send()
|
||||
|
||||
async def destroy(self, room: JID, reason='', altroom='', *,
|
||||
ifrom: Optional[JID] = None, **iqkwargs):
|
||||
"""Destroy a room."""
|
||||
|
|
Loading…
Reference in a new issue