diff --git a/src/plugins/plugin_misc_groupblog.py b/src/plugins/plugin_misc_groupblog.py index 367609de..7a85424c 100755 --- a/src/plugins/plugin_misc_groupblog.py +++ b/src/plugins/plugin_misc_groupblog.py @@ -685,12 +685,16 @@ class GroupBlog(object): data = {publisher: self.getNodeName(publisher) for publisher in jids} d_dict = yield self.host.plugins["XEP-0060"].getItemsFromMany(client.item_access_pubsub, data, max_items=max_items, profile_key=profile) + + def cb(jid): + def res(gbdata): + return (jid.full(), gbdata) + return res + for publisher, d in d_dict.items(): d.addCallback(self._itemsConstruction, publisher, client) - d.addCallback(lambda gbdata: (publisher.full(), gbdata)) - # consume the failure "StanzaError with condition u'item-not-found'" - # when the node doesn't exist (e.g that JID hasn't posted any message) - result = yield defer.DeferredList(d_dict.values(), consumeErrors=True) + d.addCallback(cb(publisher)) + result = yield defer.DeferredList(d_dict.values(), consumeErrors=False) defer.returnValue({value[0]: value[1] for success, value in result if success}) def subscribeGroupBlog(self, pub_jid, profile_key=C.PROF_KEY_NONE): @@ -739,9 +743,7 @@ class GroupBlog(object): node_ids = [self.getNodeName(publisher) for publisher in jids] d_list = yield self.host.plugins["XEP-0060"].subscribeToMany(client.item_access_pubsub, node_ids, profile_key=profile_key) - # consume the failure "StanzaError with condition u'item-not-found'" - # when the node doesn't exist (e.g that JID hasn't posted any message) - result = yield defer.DeferredList(d_list, consumeErrors=True) + result = yield defer.DeferredList(d_list, consumeErrors=False) defer.returnValue(result) def deleteAllGroupBlogsAndComments(self, profile_key=C.PROF_KEY_NONE): diff --git a/src/plugins/plugin_xep_0060.py b/src/plugins/plugin_xep_0060.py index e4d0f9d7..cc6a4483 100755 --- a/src/plugins/plugin_xep_0060.py +++ b/src/plugins/plugin_xep_0060.py @@ -215,7 +215,7 @@ class XEP_0060(object): @param sub_id (str): optional subscription identifier. @param options (list): optional list of subscription options @param profile_key (str): %(doc_profile_key)s - @return: dict binding a subset of the keys of data to Deferred instances. + @return: list of Deferred instances. """ profile, client = self.__getClientNProfile(profile_key, 'subscribe nodes') found_nodes = yield self.listNodes(service, profile=profile)