summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2021-02-23 22:15:25 +0100
committerLink Mauve <linkmauve@linkmauve.fr>2021-02-27 11:19:41 +0100
commit1c5f0d6a4a0f99641aa9a3a79c3b8c3077fa08f2 (patch)
treec3b0c5e2585c596ad7fd0928f57becedf0534356
parent2d1bf7b1dd2480a9884cde01240d05a7396b3270 (diff)
downloadpoezio-1c5f0d6a4a0f99641aa9a3a79c3b8c3077fa08f2.tar.gz
poezio-1c5f0d6a4a0f99641aa9a3a79c3b8c3077fa08f2.tar.bz2
poezio-1c5f0d6a4a0f99641aa9a3a79c3b8c3077fa08f2.tar.xz
poezio-1c5f0d6a4a0f99641aa9a3a79c3b8c3077fa08f2.zip
muc: use slixmpp 0045 plugin to set subject
-rw-r--r--poezio/multiuserchat.py11
-rw-r--r--poezio/tabs/muctab.py2
2 files changed, 1 insertions, 12 deletions
diff --git a/poezio/multiuserchat.py b/poezio/multiuserchat.py
index a70fb4d0..34f37507 100644
--- a/poezio/multiuserchat.py
+++ b/poezio/multiuserchat.py
@@ -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,
diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py
index 2c06a52d..485c97f7 100644
--- a/poezio/tabs/muctab.py
+++ b/poezio/tabs/muctab.py
@@ -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: