diff options
author | mathieui <mathieui@mathieui.net> | 2021-01-30 17:42:20 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2021-01-30 17:42:20 +0100 |
commit | 119f59ecbe91f79c1fe42887d24720fc70f506d0 (patch) | |
tree | 3810e2f98c25e1ef2419bf2845e0374e5ac7d06d | |
parent | ee671dfb294e3615e42f3f407b6ab2c4df698a98 (diff) | |
download | slixmpp-119f59ecbe91f79c1fe42887d24720fc70f506d0.tar.gz slixmpp-119f59ecbe91f79c1fe42887d24720fc70f506d0.tar.bz2 slixmpp-119f59ecbe91f79c1fe42887d24720fc70f506d0.tar.xz slixmpp-119f59ecbe91f79c1fe42887d24720fc70f506d0.zip |
XEP-0369: Add events for channel/participants
-rw-r--r-- | slixmpp/plugins/xep_0369/mix_core.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/slixmpp/plugins/xep_0369/mix_core.py b/slixmpp/plugins/xep_0369/mix_core.py index 19450c12..529026b5 100644 --- a/slixmpp/plugins/xep_0369/mix_core.py +++ b/slixmpp/plugins/xep_0369/mix_core.py @@ -72,9 +72,22 @@ class XEP_0369(BasePlugin): def session_bind(self, jid): self.xmpp.plugin['xep_0030'].add_feature(stanza.NS) + self.xmpp.plugin['xep_0060'].map_node_event( + 'urn:xmpp:mix:nodes:participants', + 'mix_participant_info', + ) + self.xmpp.plugin['xep_0060'].map_node_event( + 'urn:xmpp:mix:nodes:info', + 'mix_channel_info', + ) def plugin_end(self): self.xmpp.plugin['xep_0030'].del_feature(feature=stanza.NS) + node_map = self.xmpp.plugin['xep_0060'].node_event_map + if 'urn:xmpp:mix:nodes:info' in node_map: + del node_map['urn:xmpp:mix:nodes:info'] + if 'urn:xmpp:mix:nodes:participants' in node_map: + del node_map['urn:xmpp:mix:nodes:participants'] async def get_channel_info(self, channel: JID) -> InfoType: """" |