plugin XEP-0277: encoding fix

This commit is contained in:
Goffi 2014-02-20 13:28:09 +01:00
commit cf08f0127a

View file

@ -246,8 +246,8 @@ class XEP_0277(object):
_entry.author.name = data.get('author', self.host.getJidNStream(profile)[0].userhost()).encode('utf-8')
_entry.updated = float(data.get('updated', time()))
_entry.published = float(data.get('published', time()))
entry_id = data.get('id', str(_uuid))
_entry.id = entry_id
entry_id = data.get('id', unicode(_uuid))
_entry.id = entry_id.encode('utf-8')
if 'comments' in data:
link = atom.Link()
link.attrs['href'] = data['comments']