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_"
This commit is contained in:
parent
4c25ec71ba
commit
59d21b93d1
1 changed files with 47 additions and 38 deletions
|
|
@ -214,6 +214,7 @@ class GroupBlog(object):
|
|||
|
||||
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 @@ class GroupBlog(object):
|
|||
|
||||
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 @@ class GroupBlog(object):
|
|||
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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue