summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0009/binding.py
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/plugins/xep_0009/binding.py')
-rw-r--r--sleekxmpp/plugins/xep_0009/binding.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/sleekxmpp/plugins/xep_0009/binding.py b/sleekxmpp/plugins/xep_0009/binding.py
index 30f02d36..ef34b580 100644
--- a/sleekxmpp/plugins/xep_0009/binding.py
+++ b/sleekxmpp/plugins/xep_0009/binding.py
@@ -63,7 +63,7 @@ def _py2xml(*args):
double.text = str(x)
val.append(double)
elif type(x) is rpcbase64:
- b64 = ET.Element("Base64")
+ b64 = ET.Element("base64")
b64.text = x.encoded()
val.append(b64)
elif type(x) is rpctime:
@@ -110,7 +110,10 @@ def _xml2py(value):
return value.find('{%s}string' % namespace).text
if value.find('{%s}double' % namespace) is not None:
return float(value.find('{%s}double' % namespace).text)
+ if value.find('{%s}base64') is not None:
+ return rpcbase64(value.find('base64' % namespace).text)
if value.find('{%s}Base64') is not None:
+ # Older versions of XEP-0009 used Base64
return rpcbase64(value.find('Base64' % namespace).text)
if value.find('{%s}dateTime.iso8601') is not None:
return rpctime(value.find('{%s}dateTime.iso8601'))