From af13bea2b8abc0d8ff4d32c4c2554db550d473fd Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Tue, 3 Apr 2012 22:41:37 -0700 Subject: [PATCH] Fix MUC invite events so that they actually work. --- sleekxmpp/plugins/xep_0045.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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("" % self.xmpp.default_ns), self.handle_groupchat_presence)) self.xmpp.registerHandler(Callback('MUCMessage', MatchXMLMask("" % self.xmpp.default_ns), self.handle_groupchat_message)) self.xmpp.registerHandler(Callback('MUCSubject', MatchXMLMask("" % 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.