# HG changeset patch # User Goffi # Date 1448292092 -3600 # Node ID b08b828a87c980276630010239fddbbfb9ac63a6 # Parent b58c8b4715c65c47abde82cf6ea7bd57f6553c86 quick frontend (blog): fixed group blog panels (displaying only, sending is not working yet) diff -r b58c8b4715c6 -r b08b828a87c9 frontends/src/quick_frontend/quick_blog.py --- a/frontends/src/quick_frontend/quick_blog.py Mon Nov 23 15:51:19 2015 +0100 +++ b/frontends/src/quick_frontend/quick_blog.py Mon Nov 23 16:21:32 2015 +0100 @@ -375,10 +375,13 @@ 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 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 """ diff -r b58c8b4715c6 -r b08b828a87c9 src/core/sat_main.py --- a/src/core/sat_main.py Mon Nov 23 15:51:19 2015 +0100 +++ b/src/core/sat_main.py Mon Nov 23 16:21:32 2015 +0100 @@ -364,7 +364,7 @@ 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. """