summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2010-06-27 16:34:48 -0400
committerLance Stout <lancestout@gmail.com>2010-06-27 16:34:48 -0400
commit309c9e74eb906af42841d2ab783aa18843c08878 (patch)
tree683cff40e6a2b755f08e50bbf8d05910dafa8d17 /sleekxmpp/plugins
parent6041cd1952cbe3a54354eaa6395d49986632e871 (diff)
downloadslixmpp-309c9e74eb906af42841d2ab783aa18843c08878.tar.gz
slixmpp-309c9e74eb906af42841d2ab783aa18843c08878.tar.bz2
slixmpp-309c9e74eb906af42841d2ab783aa18843c08878.tar.xz
slixmpp-309c9e74eb906af42841d2ab783aa18843c08878.zip
Fixed error in setState() method.
Diffstat (limited to 'sleekxmpp/plugins')
-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