quick frontend (blog): fixed group blog panels (displaying only, sending is not working yet)

This commit is contained in:
Goffi 2015-11-23 16:21:32 +01:00
commit 8e9ef84243
2 changed files with 9 additions and 6 deletions

View file

@ -375,10 +375,13 @@ class QuickBlog(EntriesManager, quick_widgets.QuickWidget):
def gotSession(rt_session):
self._getResults(rt_session)
if self._targets_type == C.ALL:
self.host.bridge.mbGetFromManyWithComments(C.ALL, (), 10, 10, {}, {"subscribe":C.BOOL_TRUE}, profile=self.profile, callback=gotSession)
if self._targets_type in (C.ALL, C.GROUP):
targets = tuple(self.targets) if self._targets_type is C.GROUP else ()
self.host.bridge.mbGetFromManyWithComments(self._targets_type, targets, 10, 10, {}, {"subscribe":C.BOOL_TRUE}, profile=self.profile, callback=gotSession)
own_pep = self.host.whoami.bare
self.host.bridge.mbGetFromManyWithComments(C.JID, (unicode(own_pep),), 10, 10, {}, {}, profile=self.profile, callback=gotSession)
else:
raise NotImplementedError(u'{} target type is not managed'.format(self._targets_type))
def isJidAccepted(self, jid_):
"""Tell if a jid is actepted and must be shown in this panel
@ -458,15 +461,15 @@ def registerClass(type_, cls):
def mbdata2tags(mb_data):
"""Parse the tags in microblog data.
@param mb_data (dict): microblog data as return by bridge methods
@return list[unicode]
"""
return [tag for key, tag in mb_data.iteritems() if (key == "tag" or key.startswith("tag#")) and tag]
def tags2mbdata(tags):
"""Build from the tags a dict using the microblog data format.
@param tags (list[unicode]): list of tags
@return dict
"""

View file

@ -364,7 +364,7 @@ class SAT(service.Service):
C.PROF_KEY_NONE can be used to have general plugins data (i.e. not profile dependent)
@return (dict)[Deferred]: features data where:
- key is plugin import name, present only for activated plugins
- value is a an other dict, when meaning is specifif to each plugin.
- value is a an other dict, when meaning is specific to each plugin.
this dict is return by plugin's getFeature method.
If this method doesn't exists, an empty dict is returned.
"""