changeset 851:a8260ee88708

plugin XEP-0277: encoding fix
author Goffi <goffi@goffi.org>
date Thu, 20 Feb 2014 13:28:09 +0100
parents 30fd34309949
children 4cc55e05266d
files src/plugins/plugin_xep_0277.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0277.py	Tue Feb 18 19:37:29 2014 +0100
+++ b/src/plugins/plugin_xep_0277.py	Thu Feb 20 13:28:09 2014 +0100
@@ -246,8 +246,8 @@
         _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']