# HG changeset patch # User Goffi # Date 1448290279 -3600 # Node ID b58c8b4715c65c47abde82cf6ea7bd57f6553c86 # Parent 2b8a975ff7125812c0ee9110eb5bbe6da584941d plugin XEP-0277: fixed entries in atom feed diff -r 2b8a975ff712 -r b58c8b4715c6 src/plugins/plugin_xep_0277.py --- a/src/plugins/plugin_xep_0277.py Mon Nov 23 14:58:18 2015 +0100 +++ b/src/plugins/plugin_xep_0277.py Mon Nov 23 15:51:19 2015 +0100 @@ -857,7 +857,6 @@ """ if node is None: node = NS_MICROBLOG - items, metadata = yield self._p.getItems(service_jid, node, max_items=max_items, item_ids=item_ids, rsm_request=rsm_request, extra=extra, profile_key=profile_key) feed_elt = domish.Element((NS_ATOM, 'feed')) title = D_(u"{user}'s blogposts").format(user=service_jid.user) @@ -874,4 +873,12 @@ feed_elt.addElement('id', content=node) feed_elt.addElement('updated', rfc3339.timestamp_from_tf(rfc3339.tf_utc())) + # FIXME: no cleaning is done here + # FIXME: no check is done neither, we have to be sure that we get microblogs + items, metadata = yield self._p.getItems(service_jid, node, max_items=max_items, item_ids=item_ids, rsm_request=rsm_request, extra=extra, profile_key=profile_key) + + for item in items: + entry_elt = item.elements(NS_ATOM, 'entry').next() + feed_elt.addChild(entry_elt) + defer.returnValue(u''+feed_elt.toXml())