diff options
author | mathieui <mathieui@mathieui.net> | 2020-11-30 18:44:45 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2020-12-02 19:17:33 +0100 |
commit | b62ea49de39f40a34fbde796a5b88419c133363c (patch) | |
tree | c6e573011571988b12f7b0e51c1cf0797e26c3a9 /slixmpp/plugins/xep_0404/stanza.py | |
parent | bdc12c00c6e4e7fc6a748133719c863d8183c81b (diff) | |
download | slixmpp-b62ea49de39f40a34fbde796a5b88419c133363c.tar.gz slixmpp-b62ea49de39f40a34fbde796a5b88419c133363c.tar.bz2 slixmpp-b62ea49de39f40a34fbde796a5b88419c133363c.tar.xz slixmpp-b62ea49de39f40a34fbde796a5b88419c133363c.zip |
XEP-0404: MIX-Anon: JID hidden channels
(not found)
Diffstat (limited to 'slixmpp/plugins/xep_0404/stanza.py')
-rw-r--r-- | slixmpp/plugins/xep_0404/stanza.py | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/slixmpp/plugins/xep_0404/stanza.py b/slixmpp/plugins/xep_0404/stanza.py new file mode 100644 index 00000000..9bb9308e --- /dev/null +++ b/slixmpp/plugins/xep_0404/stanza.py @@ -0,0 +1,43 @@ +""" + Slixmpp: The Slick XMPP Library + Copyright (C) 2020 Mathieu Pasquet <mathieui@mathieui.net> + This file is part of Slixmpp. + + See the file LICENSE for copying permissio +""" + +from slixmpp.xmlstream import ( + ElementBase, + register_stanza_plugin, +) +from slixmpp import Iq + +from slixmpp.plugins.xep_0004.stanza import Form +from slixmpp.plugins.xep_0060.stanza import ( + EventItem, + Item, +) + +NS = 'urn:xmpp:mix:anon:0' + + +class Participant(ElementBase): + namespace = NS + name = 'participant' + plugin_attrib = 'anon_participant' + interfaces = {'jid'} + sub_interfaces = {'jid'} + + +class UserPreference(ElementBase): + namespace = NS + name = 'user-preference' + plugin_attrib = 'user_preference' + + +def register_plugins(): + register_stanza_plugin(EventItem, Participant) + register_stanza_plugin(Item, Participant) + + register_stanza_plugin(Iq, UserPreference) + register_stanza_plugin(UserPreference, Form) |