muc: use slixmpp 0045 plugin to set subject

This commit is contained in:
Emmanuel Gil Peyrot 2021-02-23 22:15:25 +01:00 committed by Link Mauve
parent 2d1bf7b1dd
commit 1c5f0d6a4a
2 changed files with 1 additions and 12 deletions

View file

@ -54,17 +54,6 @@ def change_show(
pres.send()
def change_subject(xmpp: ClientXMPP, jid: JID, subject: str) -> None:
"""
Change the room subject
"""
jid = safeJID(jid)
msg = xmpp.make_message(jid)
msg['type'] = 'groupchat'
msg['subject'] = subject
msg.send()
def change_nick(
core: Core,
jid: JID,

View file

@ -350,7 +350,7 @@ class MucTab(ChatTab):
def change_topic(self, topic: str) -> None:
"""Change the current topic"""
muc.change_subject(self.core.xmpp, self.jid.bare, topic)
self.core.xmpp.plugin['xep_0045'].set_subject(self.jid.bare, topic)
@refresh_wrapper.always
def show_topic(self) -> None: