summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-04-03 22:41:37 -0700
committerLance Stout <lancestout@gmail.com>2012-04-03 22:41:37 -0700
commitaf13bea2b8abc0d8ff4d32c4c2554db550d473fd (patch)
treee048bfb160712cda55e85d9b128dfff6a857f48f
parentcdf0b353dbd47cfd9686c70d6a5cb000cee86d2e (diff)
downloadslixmpp-af13bea2b8abc0d8ff4d32c4c2554db550d473fd.tar.gz
slixmpp-af13bea2b8abc0d8ff4d32c4c2554db550d473fd.tar.bz2
slixmpp-af13bea2b8abc0d8ff4d32c4c2554db550d473fd.tar.xz
slixmpp-af13bea2b8abc0d8ff4d32c4c2554db550d473fd.zip
Fix MUC invite events so that they actually work.
-rw-r--r--sleekxmpp/plugins/xep_0045.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/sleekxmpp/plugins/xep_0045.py b/sleekxmpp/plugins/xep_0045.py
index 5035faae..06764d05 100644
--- a/sleekxmpp/plugins/xep_0045.py
+++ b/sleekxmpp/plugins/xep_0045.py
@@ -128,7 +128,10 @@ class XEP_0045(BasePlugin):
self.xmpp.registerHandler(Callback('MUCPresence', MatchXMLMask("<presence xmlns='%s' />" % self.xmpp.default_ns), self.handle_groupchat_presence))
self.xmpp.registerHandler(Callback('MUCMessage', MatchXMLMask("<message xmlns='%s' type='groupchat'><body/></message>" % self.xmpp.default_ns), self.handle_groupchat_message))
self.xmpp.registerHandler(Callback('MUCSubject', MatchXMLMask("<message xmlns='%s' type='groupchat'><subject/></message>" % self.xmpp.default_ns), self.handle_groupchat_subject))
- self.xmpp.registerHandler(Callback('MUCInvite', MatchXPath("{%s}message/{http://jabber.org/protocol/muc#user}x/invite" % self.xmpp.default_ns), self.handle_groupchat_invite))
+ self.xmpp.registerHandler(Callback('MUCInvite', MatchXPath("{%s}message/{%s}x/{%s}invite" % (
+ self.xmpp.default_ns,
+ 'http://jabber.org/protocol/muc#user',
+ 'http://jabber.org/protocol/muc#user')), self.handle_groupchat_invite))
def handle_groupchat_invite(self, inv):
""" Handle an invite into a muc.