blob: 9bb9308e81bea698528ec30248a5111be1ae844e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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)
|