From e3d596c9fa1a8c138df0ebd97e90c6d510b77929 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Sun, 19 Feb 2012 20:28:31 -0800 Subject: Update XEP-0085 plugin to work with both ElementTree and cElementTree Each state element must have its own stanza class now. A stanza class with an empty name field causes errors in ElementTree, even though it works fine with cElementTree. --- sleekxmpp/plugins/xep_0085/chat_states.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sleekxmpp/plugins/xep_0085/chat_states.py') 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) -- cgit v1.2.3