summaryrefslogtreecommitdiff
path: root/slixmpp/plugins/xep_0045/muc.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2020-12-03 22:05:47 +0100
committermathieui <mathieui@mathieui.net>2020-12-03 23:28:27 +0100
commitde548fbccec7df25b2221a2f9b67384ff16038cf (patch)
treededd052ba315da78514c4906c4192e6d2e6efdf6 /slixmpp/plugins/xep_0045/muc.py
parentaf46efc12a5b90162820eb773e0a723fdb14531a (diff)
downloadslixmpp-de548fbccec7df25b2221a2f9b67384ff16038cf.tar.gz
slixmpp-de548fbccec7df25b2221a2f9b67384ff16038cf.tar.bz2
slixmpp-de548fbccec7df25b2221a2f9b67384ff16038cf.tar.xz
slixmpp-de548fbccec7df25b2221a2f9b67384ff16038cf.zip
XEP-0045: Add status_codes interface to the MUC element
Diffstat (limited to 'slixmpp/plugins/xep_0045/muc.py')
-rw-r--r--slixmpp/plugins/xep_0045/muc.py10
1 files changed, 5 insertions, 5 deletions
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(
- "<message xmlns='%s' type='groupchat'>"
- "<x xmlns='http://jabber.org/protocol/muc#user'><status/></x>"
- "</message>" % self.xmpp.default_ns
- ),
+ StanzaPath('message/muc/status'),
self.handle_config_change
))
self.xmpp.register_handler(