summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/plugins')
-rw-r--r--sleekxmpp/plugins/xep_0085/chat_states.py6
-rw-r--r--sleekxmpp/plugins/xep_0085/stanza.py20
2 files changed, 25 insertions, 1 deletions
diff --git a/sleekxmpp/plugins/xep_0085/chat_states.py b/sleekxmpp/plugins/xep_0085/chat_states.py
index e95434d2..6f7cfddf 100644
--- a/sleekxmpp/plugins/xep_0085/chat_states.py
+++ b/sleekxmpp/plugins/xep_0085/chat_states.py
@@ -37,7 +37,11 @@ class xep_0085(base_plugin):
StanzaPath('message@chat_state=%s' % state),
self._handle_chat_state))
- register_stanza_plugin(Message, ChatState)
+ register_stanza_plugin(Message, stanza.Active)
+ register_stanza_plugin(Message, stanza.Composing)
+ register_stanza_plugin(Message, stanza.Gone)
+ register_stanza_plugin(Message, stanza.Inactive)
+ register_stanza_plugin(Message, stanza.Paused)
def post_init(self):
base_plugin.post_init(self)
diff --git a/sleekxmpp/plugins/xep_0085/stanza.py b/sleekxmpp/plugins/xep_0085/stanza.py
index 8c46758c..73c109ac 100644
--- a/sleekxmpp/plugins/xep_0085/stanza.py
+++ b/sleekxmpp/plugins/xep_0085/stanza.py
@@ -71,3 +71,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'