From de548fbccec7df25b2221a2f9b67384ff16038cf Mon Sep 17 00:00:00 2001 From: mathieui Date: Thu, 3 Dec 2020 22:05:47 +0100 Subject: XEP-0045: Add status_codes interface to the MUC element --- slixmpp/plugins/xep_0045/muc.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'slixmpp/plugins/xep_0045/muc.py') diff --git a/slixmpp/plugins/xep_0045/muc.py b/slixmpp/plugins/xep_0045/muc.py index f310c03e..d7b8f5c2 100644 --- a/slixmpp/plugins/xep_0045/muc.py +++ b/slixmpp/plugins/xep_0045/muc.py @@ -25,6 +25,7 @@ from slixmpp.plugins import BasePlugin from slixmpp.xmlstream import register_stanza_plugin, ET from slixmpp.xmlstream.handler.callback import Callback from slixmpp.xmlstream.matcher.xpath import MatchXPath +from slixmpp.xmlstream.matcher.stanzapath import StanzaPath from slixmpp.xmlstream.matcher.xmlmask import MatchXMLMask from slixmpp.exceptions import IqError, IqTimeout @@ -38,6 +39,7 @@ from slixmpp.plugins.xep_0045.stanza import ( MUCHistory, MUCOwnerQuery, MUCOwnerDestroy, + MUCStatus, ) @@ -62,6 +64,8 @@ class XEP_0045(BasePlugin): self.rooms = {} self.our_nicks = {} # load MUC support in presence stanzas + register_stanza_plugin(MUCMessage, MUCStatus) + register_stanza_plugin(MUCPresence, MUCStatus) register_stanza_plugin(Presence, MUCPresence) register_stanza_plugin(Presence, MUCJoin) register_stanza_plugin(MUCJoin, MUCHistory) @@ -99,11 +103,7 @@ class XEP_0045(BasePlugin): self.xmpp.register_handler( Callback( 'MUCConfig', - MatchXMLMask( - "" - "" - "" % self.xmpp.default_ns - ), + StanzaPath('message/muc/status'), self.handle_config_change )) self.xmpp.register_handler( -- cgit v1.2.3