From 1c5f0d6a4a0f99641aa9a3a79c3b8c3077fa08f2 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Tue, 23 Feb 2021 22:15:25 +0100 Subject: muc: use slixmpp 0045 plugin to set subject --- poezio/multiuserchat.py | 11 ----------- poezio/tabs/muctab.py | 2 +- 2 files changed, 1 insertion(+), 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: -- cgit v1.2.3