mirror of https://gitlab.com/bashrc2/epicyon
News inbox
parent
5d53593c83
commit
b42d7c14e4
40
daemon.py
40
daemon.py
|
@ -120,6 +120,7 @@ from webinterface import htmlInboxDMs
|
|||
from webinterface import htmlInboxReplies
|
||||
from webinterface import htmlInboxMedia
|
||||
from webinterface import htmlInboxBlogs
|
||||
from webinterface import htmlInboxNews
|
||||
from webinterface import htmlUnblockConfirm
|
||||
from webinterface import htmlPersonOptions
|
||||
from webinterface import htmlIndividualPost
|
||||
|
@ -6537,27 +6538,26 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if '/' in currNickname:
|
||||
currNickname = currNickname.split('/')[0]
|
||||
msg = \
|
||||
htmlInboxBlogs(self.server.defaultTimeline,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.translate,
|
||||
pageNumber, maxPostsInNewsFeed,
|
||||
self.server.session,
|
||||
baseDir,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.personCache,
|
||||
nickname,
|
||||
domain,
|
||||
port,
|
||||
inboxNewsFeed,
|
||||
self.server.allowDeletion,
|
||||
httpPrefix,
|
||||
self.server.projectVersion,
|
||||
self._isMinimal(nickname),
|
||||
self.server.YTReplacementDomain,
|
||||
self.server.newswire)
|
||||
htmlInboxNews(self.server.defaultTimeline,
|
||||
self.server.recentPostsCache,
|
||||
self.server.maxRecentPosts,
|
||||
self.server.translate,
|
||||
pageNumber, maxPostsInNewsFeed,
|
||||
self.server.session,
|
||||
baseDir,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.personCache,
|
||||
nickname,
|
||||
domain,
|
||||
port,
|
||||
inboxNewsFeed,
|
||||
self.server.allowDeletion,
|
||||
httpPrefix,
|
||||
self.server.projectVersion,
|
||||
self._isMinimal(nickname),
|
||||
self.server.YTReplacementDomain,
|
||||
self.server.newswire)
|
||||
msg = msg.replace('/news/', '/' + currNickname + '/')
|
||||
msg = msg.replace('tlblogs', 'tlnews')
|
||||
msg = msg.encode('utf-8')
|
||||
self._set_headers('text/html', len(msg),
|
||||
cookie, callingDomain)
|
||||
|
|
|
@ -6340,6 +6340,25 @@ def htmlInboxBlogs(defaultTimeline: str,
|
|||
minimal, YTReplacementDomain, newswire)
|
||||
|
||||
|
||||
def htmlInboxNews(defaultTimeline: str,
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, baseDir: str, wfRequest: {}, personCache: {},
|
||||
nickname: str, domain: str, port: int, inboxJson: {},
|
||||
allowDeletion: bool,
|
||||
httpPrefix: str, projectVersion: str,
|
||||
minimal: bool, YTReplacementDomain: str,
|
||||
newswire: {}) -> str:
|
||||
"""Show the news timeline as html
|
||||
"""
|
||||
return htmlTimeline(defaultTimeline, recentPostsCache, maxRecentPosts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, baseDir, wfRequest, personCache,
|
||||
nickname, domain, port, inboxJson, 'tlnews',
|
||||
allowDeletion, httpPrefix, projectVersion, False,
|
||||
minimal, YTReplacementDomain, newswire)
|
||||
|
||||
|
||||
def htmlModeration(defaultTimeline: str,
|
||||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
|
|
Loading…
Reference in New Issue