muc: use slixmpp 0045 plugin to set subject
This commit is contained in:
parent
2d1bf7b1dd
commit
1c5f0d6a4a
2 changed files with 1 additions and 12 deletions
|
@ -54,17 +54,6 @@ def change_show(
|
||||||
pres.send()
|
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(
|
def change_nick(
|
||||||
core: Core,
|
core: Core,
|
||||||
jid: JID,
|
jid: JID,
|
||||||
|
|
|
@ -350,7 +350,7 @@ class MucTab(ChatTab):
|
||||||
|
|
||||||
def change_topic(self, topic: str) -> None:
|
def change_topic(self, topic: str) -> None:
|
||||||
"""Change the current topic"""
|
"""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
|
@refresh_wrapper.always
|
||||||
def show_topic(self) -> None:
|
def show_topic(self) -> None:
|
||||||
|
|
Loading…
Reference in a new issue