diff options
author | Maxime “pep” Buquet <pep@bouah.net> | 2020-05-29 17:43:45 +0200 |
---|---|---|
committer | Maxime “pep” Buquet <pep@bouah.net> | 2020-05-29 23:35:31 +0200 |
commit | 67fb5fe4c3b0d002e7f2d6659364d2da7f6e53a7 (patch) | |
tree | a9e168f7ac48eaea23bdeca525b50676b118a865 | |
parent | 605a58a864d92b874153f41a11b6a9340bacb106 (diff) | |
download | slixmpp-67fb5fe4c3b0d002e7f2d6659364d2da7f6e53a7.tar.gz slixmpp-67fb5fe4c3b0d002e7f2d6659364d2da7f6e53a7.tar.bz2 slixmpp-67fb5fe4c3b0d002e7f2d6659364d2da7f6e53a7.tar.xz slixmpp-67fb5fe4c3b0d002e7f2d6659364d2da7f6e53a7.zip |
XEP-0045: register_stanza_plgin(Message, MUCMessage)
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rw-r--r-- | slixmpp/plugins/xep_0045/__init__.py | 2 | ||||
-rw-r--r-- | slixmpp/plugins/xep_0045/muc.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/slixmpp/plugins/xep_0045/__init__.py b/slixmpp/plugins/xep_0045/__init__.py index 75da0ca2..eb13b018 100644 --- a/slixmpp/plugins/xep_0045/__init__.py +++ b/slixmpp/plugins/xep_0045/__init__.py @@ -9,6 +9,6 @@ from slixmpp.plugins import register_plugin from slixmpp.plugins.xep_0045 import stanza from slixmpp.plugins.xep_0045.muc import XEP_0045 -from slixmpp.plugins.xep_0045.stanza import MUCPresence +from slixmpp.plugins.xep_0045.stanza import MUCPresence, MUCMessage register_plugin(XEP_0045) diff --git a/slixmpp/plugins/xep_0045/muc.py b/slixmpp/plugins/xep_0045/muc.py index c85779d1..364c47fd 100644 --- a/slixmpp/plugins/xep_0045/muc.py +++ b/slixmpp/plugins/xep_0045/muc.py @@ -19,7 +19,7 @@ from slixmpp.xmlstream.matcher.xmlmask import MatchXMLMask from slixmpp.exceptions import IqError, IqTimeout from slixmpp.plugins.xep_0045 import stanza -from slixmpp.plugins.xep_0045.stanza import MUCPresence +from slixmpp.plugins.xep_0045.stanza import MUCPresence, MUCMessage log = logging.getLogger(__name__) @@ -42,6 +42,7 @@ class XEP_0045(BasePlugin): self.xep = '0045' # load MUC support in presence stanzas register_stanza_plugin(Presence, MUCPresence) + register_stanza_plugin(Message, MUCMessage) self.xmpp.register_handler(Callback('MUCPresence', MatchXMLMask("<presence xmlns='%s' />" % self.xmpp.default_ns), self.handle_groupchat_presence)) self.xmpp.register_handler(Callback('MUCError', MatchXMLMask("<message xmlns='%s' type='error'><error/></message>" % self.xmpp.default_ns), self.handle_groupchat_error_message)) self.xmpp.register_handler(Callback('MUCMessage', MatchXMLMask("<message xmlns='%s' type='groupchat'><body/></message>" % self.xmpp.default_ns), self.handle_groupchat_message)) |