summaryrefslogtreecommitdiff
path: root/slixmpp/plugins/xep_0045/muc.py
diff options
context:
space:
mode:
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(