diff --git a/src/plugins/plugin_xep_0277.py b/src/plugins/plugin_xep_0277.py index 8bedea21..62dfe185 100755 --- a/src/plugins/plugin_xep_0277.py +++ b/src/plugins/plugin_xep_0277.py @@ -349,11 +349,8 @@ class XEP_0277(object): @param data: data dict as given by bridge method. @param item_id(unicode, None): id of the item to use - if None the id will be generated randomly @return: deferred which fire domish.Element """ - if item_id is None: - item_id = unicode(uuid.uuid4()) client = self.host.getClient(profile) entry_elt = domish.Element((NS_ATOM, 'entry')) @@ -444,7 +441,7 @@ class XEP_0277(object): category_elt['term'] = tag ## id ## - entry_id = data.get('id', item_id) # FIXME: use a proper id (see XEP-0277 §7.1) + entry_id = data.get('id', item_id or unicode(uuid.uuid4())) # FIXME: use a proper id (see XEP-0277 §7.1) entry_elt.addElement('id', content=entry_id) # ## comments ##