diff options
Diffstat (limited to 'sleekxmpp/plugins/xep_0085/stanza.py')
-rw-r--r-- | sleekxmpp/plugins/xep_0085/stanza.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sleekxmpp/plugins/xep_0085/stanza.py b/sleekxmpp/plugins/xep_0085/stanza.py index 8c46758c..c2cafb19 100644 --- a/sleekxmpp/plugins/xep_0085/stanza.py +++ b/sleekxmpp/plugins/xep_0085/stanza.py @@ -38,6 +38,7 @@ class ChatState(ElementBase): namespace = 'http://jabber.org/protocol/chatstates' plugin_attrib = 'chat_state' interfaces = set(('chat_state',)) + sub_interfaces = interfaces is_extension = True states = set(('active', 'composing', 'gone', 'inactive', 'paused')) @@ -71,3 +72,23 @@ class ChatState(ElementBase): if state_xml is not None: self.xml = ET.Element('') parent.xml.remove(state_xml) + + +class Active(ChatState): + name = 'active' + + +class Composing(ChatState): + name = 'composing' + + +class Gone(ChatState): + name = 'gone' + + +class Inactive(ChatState): + name = 'inactive' + + +class Paused(ChatState): + name = 'paused' |