From 309c9e74eb906af42841d2ab783aa18843c08878 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Sun, 27 Jun 2010 16:34:48 -0400 Subject: [PATCH] Fixed error in setState() method. --- sleekxmpp/plugins/xep_0085.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sleekxmpp/plugins/xep_0085.py b/sleekxmpp/plugins/xep_0085.py index e183ec2..e24e9db 100644 --- a/sleekxmpp/plugins/xep_0085.py +++ b/sleekxmpp/plugins/xep_0085.py @@ -38,8 +38,9 @@ class ChatState(ElementBase): def setState(self, state): if state in self.states: self.name = state - self.xml.tag = state - self.xml.attrib['xmlns'] = self.namespace + self.xml.tag = '{%s}%s' % (self.namespace, state) + else: + raise ValueError('Invalid chat state') def getState(self): return self.name