From 119f59ecbe91f79c1fe42887d24720fc70f506d0 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sat, 30 Jan 2021 17:42:20 +0100 Subject: [PATCH] XEP-0369: Add events for channel/participants --- slixmpp/plugins/xep_0369/mix_core.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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: """"