mirror of
https://github.com/HelloZeroNet/ZeroNet.git
synced 2023-12-14 04:33:03 +01:00
Rev1899, Add followed feed number to site info
This commit is contained in:
parent
94485ed78c
commit
179ee2d2a4
2 changed files with 10 additions and 1 deletions
|
@ -7,6 +7,15 @@ from Db import DbQuery
|
|||
|
||||
@PluginManager.registerTo("UiWebsocket")
|
||||
class UiWebsocketPlugin(object):
|
||||
def formatSiteInfo(self, site, create_user=True):
|
||||
site_info = super(UiWebsocketPlugin, self).formatSiteInfo(site, create_user=True)
|
||||
feed_following = self.user.sites[site.address].get("follow", None)
|
||||
if feed_following == None:
|
||||
site_info["feed_following"] = None
|
||||
else:
|
||||
site_info["feed_following"] = len(feed_following)
|
||||
return site_info
|
||||
|
||||
def actionFeedFollow(self, to, feeds):
|
||||
self.user.setFeedFollow(self.site.address, feeds)
|
||||
self.user.save()
|
||||
|
|
|
@ -10,7 +10,7 @@ class Config(object):
|
|||
|
||||
def __init__(self, argv):
|
||||
self.version = "0.5.2"
|
||||
self.rev = 1896
|
||||
self.rev = 1899
|
||||
self.argv = argv
|
||||
self.action = None
|
||||
self.config_file = "zeronet.conf"
|
||||
|
|
Loading…
Reference in a new issue