diff options
author | mathieui <mathieui@mathieui.net> | 2021-01-30 18:17:12 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2021-01-30 18:17:12 +0100 |
commit | 04a3f609e2b1fe7ae0ecaa2e1b251c7fcead33b1 (patch) | |
tree | 570373c61978e56847c27436c9ad8a9e75c3bf47 /slixmpp/plugins/xep_0405/stanza.py | |
parent | 119f59ecbe91f79c1fe42887d24720fc70f506d0 (diff) | |
download | slixmpp-04a3f609e2b1fe7ae0ecaa2e1b251c7fcead33b1.tar.gz slixmpp-04a3f609e2b1fe7ae0ecaa2e1b251c7fcead33b1.tar.bz2 slixmpp-04a3f609e2b1fe7ae0ecaa2e1b251c7fcead33b1.tar.xz slixmpp-04a3f609e2b1fe7ae0ecaa2e1b251c7fcead33b1.zip |
XEP-0405: Manage MIX Roster items
Diffstat (limited to 'slixmpp/plugins/xep_0405/stanza.py')
-rw-r--r-- | slixmpp/plugins/xep_0405/stanza.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/slixmpp/plugins/xep_0405/stanza.py b/slixmpp/plugins/xep_0405/stanza.py index fe221bd6..58133d98 100644 --- a/slixmpp/plugins/xep_0405/stanza.py +++ b/slixmpp/plugins/xep_0405/stanza.py @@ -8,6 +8,7 @@ from slixmpp import JID from slixmpp.stanza import Iq +from slixmpp.stanza.roster import Roster, RosterItem from slixmpp.xmlstream import ( ElementBase, register_stanza_plugin, @@ -19,6 +20,7 @@ from slixmpp.plugins.xep_0369.stanza import ( ) NS = 'urn:xmpp:mix:pam:2' +NS_ROSTER = 'urn:xmpp:mix:roster:0' class ClientJoin(ElementBase): @@ -35,9 +37,25 @@ class ClientLeave(ElementBase): interfaces = {'channel'} +class Annotate(ElementBase): + namespace = NS_ROSTER + name = 'annotate' + plugin_attrib = 'annotate' + + +class Channel(ElementBase): + namespace = NS_ROSTER + name = 'channel' + plugin_attrib = 'channel' + interfaces = {'participant-id'} + + def register_plugins(): register_stanza_plugin(Iq, ClientJoin) register_stanza_plugin(ClientJoin, Join) register_stanza_plugin(Iq, ClientLeave) register_stanza_plugin(ClientLeave, Leave) + + register_stanza_plugin(Roster, Annotate) + register_stanza_plugin(RosterItem, Channel) |