summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0085.py
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/plugins/xep_0085.py')
-rw-r--r--sleekxmpp/plugins/xep_0085.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/sleekxmpp/plugins/xep_0085.py b/sleekxmpp/plugins/xep_0085.py
index e183ec27..e24e9db0 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