MCPcopy Index your code
hub / github.com/HelloZeroNet/ZeroNet / formatSiteInfo

Method formatSiteInfo

plugins/Newsfeed/NewsfeedPlugin.py:13–20  ·  view source on GitHub ↗
(self, site, create_user=True)

Source from the content-addressed store, hash-verified

11@PluginManager.registerTo("UiWebsocket")
12class UiWebsocketPlugin(object):
13 def formatSiteInfo(self, site, create_user=True):
14 site_info = super(UiWebsocketPlugin, self).formatSiteInfo(site, create_user=create_user)
15 feed_following = self.user.sites.get(site.address, {}).get("follow", None)
16 if feed_following == None:
17 site_info["feed_follow_num"] = None
18 else:
19 site_info["feed_follow_num"] = len(feed_following)
20 return site_info
21
22 def actionFeedFollow(self, to, feeds):
23 self.user.setFeedFollow(self.site.address, feeds)

Callers 1

actionMergerSiteListMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected