Mercurial > libervia-backend
diff src/plugins/plugin_misc_groupblog.py @ 1419:be2df1ddea8e
plugins (groupblog, xep-0277) + tmp(rsm): improved style:
- removed external parenthesis in assertions
- added blank line after first line of docstrings
- replaced "__" prefixes by "_"
- renamed variabled named after the reserverd word "max" to "max_"
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 22 Apr 2015 18:30:28 +0200 |
parents | 3265a2639182 |
children | 7c0acb966fd6 |
line wrap: on
line diff
--- a/src/plugins/plugin_misc_groupblog.py Mon Apr 20 16:46:17 2015 +0200 +++ b/src/plugins/plugin_misc_groupblog.py Wed Apr 22 18:30:28 2015 +0200 @@ -214,6 +214,7 @@ def _handleCommentsItems(self, items, service, node_identifier): """ Convert comments items to groupblog data, and send them as signals + @param items: comments items @param service: jid of the PubSub service used @param node_identifier: comments node @@ -261,12 +262,15 @@ def getNodeName(self, publisher): """Retrieve the name of publisher's node + @param publisher: publisher's jid - @return: node's name (string)""" + @return: node's name (string) + """ return NS_NODE_PREFIX + publisher.userhost() def _publishMblog(self, service, client, access_type, access_list, message, extra): """Actually publish the message on the group blog + @param service: jid of the item-access pubsub service @param client: SatXMPPClient of the publisher @param access_type: one of "PUBLIC", "GROUP", "JID" @@ -745,7 +749,7 @@ jids = self._getPublishersJIDs(publishers_type, publishers, client) 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) - result = yield defer.DeferredList(d_list, consumeErrors=False) + yield defer.DeferredList(d_list, consumeErrors=False) defer.returnValue(None) def deleteAllGroupBlogsAndComments(self, profile_key=C.PROF_KEY_NONE):