forked from indymedia/epicyon
Start of custom peertube sites
parent
d7da2f2e65
commit
cf4d9466eb
21
blog.py
21
blog.py
|
@ -158,6 +158,7 @@ def _htmlBlogPostContent(authorized: bool,
|
||||||
nickname: str, domain: str, domainFull: str,
|
nickname: str, domain: str, domainFull: str,
|
||||||
postJsonObject: {},
|
postJsonObject: {},
|
||||||
handle: str, restrictToDomain: bool,
|
handle: str, restrictToDomain: bool,
|
||||||
|
peertubeInstances: [],
|
||||||
blogSeparator='<hr>') -> str:
|
blogSeparator='<hr>') -> str:
|
||||||
"""Returns the content for a single blog post
|
"""Returns the content for a single blog post
|
||||||
"""
|
"""
|
||||||
|
@ -231,7 +232,8 @@ def _htmlBlogPostContent(authorized: bool,
|
||||||
|
|
||||||
if postJsonObject['object'].get('content'):
|
if postJsonObject['object'].get('content'):
|
||||||
contentStr = addEmbeddedElements(translate,
|
contentStr = addEmbeddedElements(translate,
|
||||||
postJsonObject['object']['content'])
|
postJsonObject['object']['content'],
|
||||||
|
peertubeInstances)
|
||||||
if postJsonObject['object'].get('tag'):
|
if postJsonObject['object'].get('tag'):
|
||||||
contentStr = replaceEmojiFromTags(contentStr,
|
contentStr = replaceEmojiFromTags(contentStr,
|
||||||
postJsonObject['object']['tag'],
|
postJsonObject['object']['tag'],
|
||||||
|
@ -375,7 +377,8 @@ def _htmlBlogRemoveCwButton(blogStr: str, translate: {}) -> str:
|
||||||
def htmlBlogPost(authorized: bool,
|
def htmlBlogPost(authorized: bool,
|
||||||
baseDir: str, httpPrefix: str, translate: {},
|
baseDir: str, httpPrefix: str, translate: {},
|
||||||
nickname: str, domain: str, domainFull: str,
|
nickname: str, domain: str, domainFull: str,
|
||||||
postJsonObject: {}) -> str:
|
postJsonObject: {},
|
||||||
|
peertubeInstances: []) -> str:
|
||||||
"""Returns a html blog post
|
"""Returns a html blog post
|
||||||
"""
|
"""
|
||||||
blogStr = ''
|
blogStr = ''
|
||||||
|
@ -390,7 +393,8 @@ def htmlBlogPost(authorized: bool,
|
||||||
httpPrefix, translate,
|
httpPrefix, translate,
|
||||||
nickname, domain,
|
nickname, domain,
|
||||||
domainFull, postJsonObject,
|
domainFull, postJsonObject,
|
||||||
None, False)
|
None, False,
|
||||||
|
peertubeInstances)
|
||||||
|
|
||||||
# show rss links
|
# show rss links
|
||||||
blogStr += '<p class="rssfeed">'
|
blogStr += '<p class="rssfeed">'
|
||||||
|
@ -417,7 +421,8 @@ def htmlBlogPost(authorized: bool,
|
||||||
def htmlBlogPage(authorized: bool, session,
|
def htmlBlogPage(authorized: bool, session,
|
||||||
baseDir: str, httpPrefix: str, translate: {},
|
baseDir: str, httpPrefix: str, translate: {},
|
||||||
nickname: str, domain: str, port: int,
|
nickname: str, domain: str, port: int,
|
||||||
noOfItems: int, pageNumber: int) -> str:
|
noOfItems: int, pageNumber: int,
|
||||||
|
peertubeInstances: []) -> str:
|
||||||
"""Returns a html blog page containing posts
|
"""Returns a html blog page containing posts
|
||||||
"""
|
"""
|
||||||
if ' ' in nickname or '@' in nickname or \
|
if ' ' in nickname or '@' in nickname or \
|
||||||
|
@ -477,7 +482,8 @@ def htmlBlogPage(authorized: bool, session,
|
||||||
httpPrefix, translate,
|
httpPrefix, translate,
|
||||||
nickname, domain,
|
nickname, domain,
|
||||||
domainFull, item,
|
domainFull, item,
|
||||||
None, True)
|
None, True,
|
||||||
|
peertubeInstances)
|
||||||
|
|
||||||
if len(timelineJson['orderedItems']) >= noOfItems:
|
if len(timelineJson['orderedItems']) >= noOfItems:
|
||||||
blogStr += navigateStr
|
blogStr += navigateStr
|
||||||
|
@ -638,7 +644,8 @@ def _singleBlogAccountNickname(baseDir: str) -> str:
|
||||||
def htmlBlogView(authorized: bool,
|
def htmlBlogView(authorized: bool,
|
||||||
session, baseDir: str, httpPrefix: str,
|
session, baseDir: str, httpPrefix: str,
|
||||||
translate: {}, domain: str, port: int,
|
translate: {}, domain: str, port: int,
|
||||||
noOfItems: int) -> str:
|
noOfItems: int,
|
||||||
|
peertubeInstances: []) -> str:
|
||||||
"""Show the blog main page
|
"""Show the blog main page
|
||||||
"""
|
"""
|
||||||
blogStr = ''
|
blogStr = ''
|
||||||
|
@ -654,7 +661,7 @@ def htmlBlogView(authorized: bool,
|
||||||
return htmlBlogPage(authorized, session,
|
return htmlBlogPage(authorized, session,
|
||||||
baseDir, httpPrefix, translate,
|
baseDir, httpPrefix, translate,
|
||||||
nickname, domain, port,
|
nickname, domain, port,
|
||||||
noOfItems, 1)
|
noOfItems, 1, peertubeInstances)
|
||||||
|
|
||||||
domainFull = getFullDomain(domain, port)
|
domainFull = getFullDomain(domain, port)
|
||||||
|
|
||||||
|
|
90
daemon.py
90
daemon.py
|
@ -2490,7 +2490,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
httpPrefix,
|
httpPrefix,
|
||||||
self.server.projectVersion,
|
self.server.projectVersion,
|
||||||
self.server.YTReplacementDomain,
|
self.server.YTReplacementDomain,
|
||||||
self.server.showPublishedDateOnly)
|
self.server.showPublishedDateOnly,
|
||||||
|
self.server.peertubeInstances)
|
||||||
if hashtagStr:
|
if hashtagStr:
|
||||||
msg = hashtagStr.encode('utf-8')
|
msg = hashtagStr.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
|
@ -2541,7 +2542,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.personCache,
|
self.server.personCache,
|
||||||
port,
|
port,
|
||||||
self.server.YTReplacementDomain,
|
self.server.YTReplacementDomain,
|
||||||
self.server.showPublishedDateOnly)
|
self.server.showPublishedDateOnly,
|
||||||
|
self.server.peertubeInstances)
|
||||||
if historyStr:
|
if historyStr:
|
||||||
msg = historyStr.encode('utf-8')
|
msg = historyStr.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
|
@ -2585,7 +2587,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.projectVersion,
|
self.server.projectVersion,
|
||||||
self.server.YTReplacementDomain,
|
self.server.YTReplacementDomain,
|
||||||
self.server.showPublishedDateOnly,
|
self.server.showPublishedDateOnly,
|
||||||
self.server.defaultTimeline)
|
self.server.defaultTimeline,
|
||||||
|
self.server.peertubeInstances)
|
||||||
if profileStr:
|
if profileStr:
|
||||||
msg = profileStr.encode('utf-8')
|
msg = profileStr.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
|
@ -5380,7 +5383,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
httpPrefix,
|
httpPrefix,
|
||||||
self.server.projectVersion,
|
self.server.projectVersion,
|
||||||
self.server.YTReplacementDomain,
|
self.server.YTReplacementDomain,
|
||||||
self.server.showPublishedDateOnly)
|
self.server.showPublishedDateOnly,
|
||||||
|
self.server.peertubeInstances)
|
||||||
if hashtagStr:
|
if hashtagStr:
|
||||||
msg = hashtagStr.encode('utf-8')
|
msg = hashtagStr.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
|
@ -6341,7 +6345,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
__version__, self.server.cachedWebfingers,
|
__version__, self.server.cachedWebfingers,
|
||||||
self.server.personCache, callingDomain,
|
self.server.personCache, callingDomain,
|
||||||
self.server.YTReplacementDomain,
|
self.server.YTReplacementDomain,
|
||||||
self.server.showPublishedDateOnly)
|
self.server.showPublishedDateOnly,
|
||||||
|
self.server.peertubeInstances)
|
||||||
if deleteStr:
|
if deleteStr:
|
||||||
deleteStrLen = len(deleteStr)
|
deleteStrLen = len(deleteStr)
|
||||||
self._set_headers('text/html', deleteStrLen,
|
self._set_headers('text/html', deleteStrLen,
|
||||||
|
@ -6527,6 +6532,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
personCache = self.server.personCache
|
personCache = self.server.personCache
|
||||||
projectVersion = self.server.projectVersion
|
projectVersion = self.server.projectVersion
|
||||||
ytDomain = self.server.YTReplacementDomain
|
ytDomain = self.server.YTReplacementDomain
|
||||||
|
peertubeInstances = self.server.peertubeInstances
|
||||||
msg = \
|
msg = \
|
||||||
htmlPostReplies(self.server.cssCache,
|
htmlPostReplies(self.server.cssCache,
|
||||||
recentPostsCache,
|
recentPostsCache,
|
||||||
|
@ -6543,7 +6549,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
httpPrefix,
|
httpPrefix,
|
||||||
projectVersion,
|
projectVersion,
|
||||||
ytDomain,
|
ytDomain,
|
||||||
self.server.showPublishedDateOnly)
|
self.server.showPublishedDateOnly,
|
||||||
|
peertubeInstances)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html', msglen,
|
self._set_headers('text/html', msglen,
|
||||||
|
@ -6611,6 +6618,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
personCache = self.server.personCache
|
personCache = self.server.personCache
|
||||||
projectVersion = self.server.projectVersion
|
projectVersion = self.server.projectVersion
|
||||||
ytDomain = self.server.YTReplacementDomain
|
ytDomain = self.server.YTReplacementDomain
|
||||||
|
peertubeInstances = self.server.peertubeInstances
|
||||||
msg = \
|
msg = \
|
||||||
htmlPostReplies(self.server.cssCache,
|
htmlPostReplies(self.server.cssCache,
|
||||||
recentPostsCache,
|
recentPostsCache,
|
||||||
|
@ -6627,7 +6635,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
httpPrefix,
|
httpPrefix,
|
||||||
projectVersion,
|
projectVersion,
|
||||||
ytDomain,
|
ytDomain,
|
||||||
self.server.showPublishedDateOnly)
|
self.server.showPublishedDateOnly,
|
||||||
|
peertubeInstances)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html', msglen,
|
self._set_headers('text/html', msglen,
|
||||||
|
@ -6713,6 +6722,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.newswire,
|
self.server.newswire,
|
||||||
self.server.themeName,
|
self.server.themeName,
|
||||||
self.server.dormantMonths,
|
self.server.dormantMonths,
|
||||||
|
self.server.peertubeInstances,
|
||||||
actorJson['roles'],
|
actorJson['roles'],
|
||||||
None, None)
|
None, None)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
|
@ -6796,6 +6806,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.newswire,
|
self.server.newswire,
|
||||||
self.server.themeName,
|
self.server.themeName,
|
||||||
self.server.dormantMonths,
|
self.server.dormantMonths,
|
||||||
|
self.server.peertubeInstances,
|
||||||
actorJson['skills'],
|
actorJson['skills'],
|
||||||
None, None)
|
None, None)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
|
@ -6900,6 +6911,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.YTReplacementDomain
|
self.server.YTReplacementDomain
|
||||||
showPublishedDateOnly = \
|
showPublishedDateOnly = \
|
||||||
self.server.showPublishedDateOnly
|
self.server.showPublishedDateOnly
|
||||||
|
peertubeInstances = \
|
||||||
|
self.server.peertubeInstances
|
||||||
cssCache = self.server.cssCache
|
cssCache = self.server.cssCache
|
||||||
msg = \
|
msg = \
|
||||||
htmlIndividualPost(cssCache,
|
htmlIndividualPost(cssCache,
|
||||||
|
@ -6919,7 +6932,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
projectVersion,
|
projectVersion,
|
||||||
likedBy,
|
likedBy,
|
||||||
ytDomain,
|
ytDomain,
|
||||||
showPublishedDateOnly)
|
showPublishedDateOnly,
|
||||||
|
peertubeInstances)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html', msglen,
|
self._set_headers('text/html', msglen,
|
||||||
|
@ -7015,6 +7029,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.YTReplacementDomain
|
self.server.YTReplacementDomain
|
||||||
showPublishedDateOnly = \
|
showPublishedDateOnly = \
|
||||||
self.server.showPublishedDateOnly
|
self.server.showPublishedDateOnly
|
||||||
|
peertubeInstances = \
|
||||||
|
self.server.peertubeInstances
|
||||||
msg = \
|
msg = \
|
||||||
htmlIndividualPost(self.server.cssCache,
|
htmlIndividualPost(self.server.cssCache,
|
||||||
recentPostsCache,
|
recentPostsCache,
|
||||||
|
@ -7033,7 +7049,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
projectVersion,
|
projectVersion,
|
||||||
likedBy,
|
likedBy,
|
||||||
ytDomain,
|
ytDomain,
|
||||||
showPublishedDateOnly)
|
showPublishedDateOnly,
|
||||||
|
peertubeInstances)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html', msglen,
|
self._set_headers('text/html', msglen,
|
||||||
|
@ -7165,7 +7182,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.rssIconAtTop,
|
self.server.rssIconAtTop,
|
||||||
self.server.publishButtonAtTop,
|
self.server.publishButtonAtTop,
|
||||||
authorized,
|
authorized,
|
||||||
self.server.themeName)
|
self.server.themeName,
|
||||||
|
self.server.peertubeInstances)
|
||||||
if GETstartTime:
|
if GETstartTime:
|
||||||
self._benchmarkGETtimings(GETstartTime, GETtimings,
|
self._benchmarkGETtimings(GETstartTime, GETtimings,
|
||||||
'show status done',
|
'show status done',
|
||||||
|
@ -7291,7 +7309,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.iconsAsButtons,
|
self.server.iconsAsButtons,
|
||||||
self.server.rssIconAtTop,
|
self.server.rssIconAtTop,
|
||||||
self.server.publishButtonAtTop,
|
self.server.publishButtonAtTop,
|
||||||
authorized, self.server.themeName)
|
authorized, self.server.themeName,
|
||||||
|
self.server.peertubeInstances)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html', msglen,
|
self._set_headers('text/html', msglen,
|
||||||
|
@ -7410,7 +7429,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.iconsAsButtons,
|
self.server.iconsAsButtons,
|
||||||
self.server.rssIconAtTop,
|
self.server.rssIconAtTop,
|
||||||
self.server.publishButtonAtTop,
|
self.server.publishButtonAtTop,
|
||||||
authorized, self.server.themeName)
|
authorized, self.server.themeName,
|
||||||
|
self.server.peertubeInstances)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html', msglen,
|
self._set_headers('text/html', msglen,
|
||||||
|
@ -7530,7 +7550,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.rssIconAtTop,
|
self.server.rssIconAtTop,
|
||||||
self.server.publishButtonAtTop,
|
self.server.publishButtonAtTop,
|
||||||
authorized,
|
authorized,
|
||||||
self.server.themeName)
|
self.server.themeName,
|
||||||
|
self.server.peertubeInstances)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html', msglen,
|
self._set_headers('text/html', msglen,
|
||||||
|
@ -7650,7 +7671,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.rssIconAtTop,
|
self.server.rssIconAtTop,
|
||||||
self.server.publishButtonAtTop,
|
self.server.publishButtonAtTop,
|
||||||
authorized,
|
authorized,
|
||||||
self.server.themeName)
|
self.server.themeName,
|
||||||
|
self.server.peertubeInstances)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html', msglen,
|
self._set_headers('text/html', msglen,
|
||||||
|
@ -7779,7 +7801,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.rssIconAtTop,
|
self.server.rssIconAtTop,
|
||||||
self.server.publishButtonAtTop,
|
self.server.publishButtonAtTop,
|
||||||
authorized,
|
authorized,
|
||||||
self.server.themeName)
|
self.server.themeName,
|
||||||
|
self.server.peertubeInstances)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html', msglen,
|
self._set_headers('text/html', msglen,
|
||||||
|
@ -7904,7 +7927,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.rssIconAtTop,
|
self.server.rssIconAtTop,
|
||||||
self.server.publishButtonAtTop,
|
self.server.publishButtonAtTop,
|
||||||
authorized,
|
authorized,
|
||||||
self.server.themeName)
|
self.server.themeName,
|
||||||
|
self.server.peertubeInstances)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html', msglen,
|
self._set_headers('text/html', msglen,
|
||||||
|
@ -7990,7 +8014,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.iconsAsButtons,
|
self.server.iconsAsButtons,
|
||||||
self.server.rssIconAtTop,
|
self.server.rssIconAtTop,
|
||||||
self.server.publishButtonAtTop,
|
self.server.publishButtonAtTop,
|
||||||
authorized, self.server.themeName)
|
authorized, self.server.themeName,
|
||||||
|
self.server.peertubeInstances)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html', msglen,
|
self._set_headers('text/html', msglen,
|
||||||
|
@ -8093,7 +8118,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.rssIconAtTop,
|
self.server.rssIconAtTop,
|
||||||
self.server.publishButtonAtTop,
|
self.server.publishButtonAtTop,
|
||||||
authorized,
|
authorized,
|
||||||
self.server.themeName)
|
self.server.themeName,
|
||||||
|
self.server.peertubeInstances)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html', msglen,
|
self._set_headers('text/html', msglen,
|
||||||
|
@ -8216,7 +8242,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.rssIconAtTop,
|
self.server.rssIconAtTop,
|
||||||
self.server.publishButtonAtTop,
|
self.server.publishButtonAtTop,
|
||||||
authorized,
|
authorized,
|
||||||
self.server.themeName)
|
self.server.themeName,
|
||||||
|
self.server.peertubeInstances)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html', msglen,
|
self._set_headers('text/html', msglen,
|
||||||
|
@ -8331,7 +8358,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.rssIconAtTop,
|
self.server.rssIconAtTop,
|
||||||
self.server.publishButtonAtTop,
|
self.server.publishButtonAtTop,
|
||||||
authorized,
|
authorized,
|
||||||
self.server.themeName)
|
self.server.themeName,
|
||||||
|
self.server.peertubeInstances)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html', msglen,
|
self._set_headers('text/html', msglen,
|
||||||
|
@ -8436,7 +8464,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.rssIconAtTop,
|
self.server.rssIconAtTop,
|
||||||
self.server.publishButtonAtTop,
|
self.server.publishButtonAtTop,
|
||||||
authorized, moderationActionStr,
|
authorized, moderationActionStr,
|
||||||
self.server.themeName)
|
self.server.themeName,
|
||||||
|
self.server.peertubeInstances)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html', msglen,
|
self._set_headers('text/html', msglen,
|
||||||
|
@ -8535,6 +8564,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.newswire,
|
self.server.newswire,
|
||||||
self.server.themeName,
|
self.server.themeName,
|
||||||
self.server.dormantMonths,
|
self.server.dormantMonths,
|
||||||
|
self.server.peertubeInstances,
|
||||||
shares,
|
shares,
|
||||||
pageNumber, sharesPerPage)
|
pageNumber, sharesPerPage)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
|
@ -8630,6 +8660,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.newswire,
|
self.server.newswire,
|
||||||
self.server.themeName,
|
self.server.themeName,
|
||||||
self.server.dormantMonths,
|
self.server.dormantMonths,
|
||||||
|
self.server.peertubeInstances,
|
||||||
following,
|
following,
|
||||||
pageNumber,
|
pageNumber,
|
||||||
followsPerPage).encode('utf-8')
|
followsPerPage).encode('utf-8')
|
||||||
|
@ -8725,6 +8756,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.newswire,
|
self.server.newswire,
|
||||||
self.server.themeName,
|
self.server.themeName,
|
||||||
self.server.dormantMonths,
|
self.server.dormantMonths,
|
||||||
|
self.server.peertubeInstances,
|
||||||
followers,
|
followers,
|
||||||
pageNumber,
|
pageNumber,
|
||||||
followsPerPage).encode('utf-8')
|
followsPerPage).encode('utf-8')
|
||||||
|
@ -8795,6 +8827,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.newswire,
|
self.server.newswire,
|
||||||
self.server.themeName,
|
self.server.themeName,
|
||||||
self.server.dormantMonths,
|
self.server.dormantMonths,
|
||||||
|
self.server.peertubeInstances,
|
||||||
None, None).encode('utf-8')
|
None, None).encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html', msglen,
|
self._set_headers('text/html', msglen,
|
||||||
|
@ -8860,7 +8893,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
translate,
|
translate,
|
||||||
nickname,
|
nickname,
|
||||||
domain, port,
|
domain, port,
|
||||||
maxPostsInBlogsFeed, pageNumber)
|
maxPostsInBlogsFeed, pageNumber,
|
||||||
|
self.server.peertubeInstances)
|
||||||
if msg is not None:
|
if msg is not None:
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
|
@ -9774,7 +9808,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.translate,
|
self.server.translate,
|
||||||
self.server.domain,
|
self.server.domain,
|
||||||
self.server.port,
|
self.server.port,
|
||||||
maxPostsInBlogsFeed)
|
maxPostsInBlogsFeed,
|
||||||
|
self.server.peertubeInstances)
|
||||||
if msg is not None:
|
if msg is not None:
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
|
@ -9870,7 +9905,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.translate,
|
self.server.translate,
|
||||||
nickname, self.server.domain,
|
nickname, self.server.domain,
|
||||||
self.server.domainFull,
|
self.server.domainFull,
|
||||||
postJsonObject)
|
postJsonObject,
|
||||||
|
self.server.peertubeInstances)
|
||||||
if msg is not None:
|
if msg is not None:
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
|
@ -13599,6 +13635,9 @@ def runDaemon(sendThreadsTimeoutMins: int,
|
||||||
httpd.iconsCache = {}
|
httpd.iconsCache = {}
|
||||||
httpd.fontsCache = {}
|
httpd.fontsCache = {}
|
||||||
|
|
||||||
|
# TODO load peertube instances
|
||||||
|
httpd.peertubeInstances = []
|
||||||
|
|
||||||
createInitialLastSeen(baseDir, httpPrefix)
|
createInitialLastSeen(baseDir, httpPrefix)
|
||||||
|
|
||||||
print('Creating inbox queue')
|
print('Creating inbox queue')
|
||||||
|
@ -13619,7 +13658,8 @@ def runDaemon(sendThreadsTimeoutMins: int,
|
||||||
httpd.showPublishedDateOnly,
|
httpd.showPublishedDateOnly,
|
||||||
httpd.allowNewsFollowers,
|
httpd.allowNewsFollowers,
|
||||||
httpd.maxFollowers,
|
httpd.maxFollowers,
|
||||||
httpd.allowLocalNetworkAccess), daemon=True)
|
httpd.allowLocalNetworkAccess,
|
||||||
|
httpd.peertubeInstances), daemon=True)
|
||||||
|
|
||||||
print('Creating scheduled post thread')
|
print('Creating scheduled post thread')
|
||||||
httpd.thrPostSchedule = \
|
httpd.thrPostSchedule = \
|
||||||
|
|
16
inbox.py
16
inbox.py
|
@ -146,7 +146,8 @@ def _inboxStorePostToHtmlCache(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
nickname: str, domain: str, port: int,
|
nickname: str, domain: str, port: int,
|
||||||
postJsonObject: {},
|
postJsonObject: {},
|
||||||
allowDeletion: bool, boxname: str,
|
allowDeletion: bool, boxname: str,
|
||||||
showPublishedDateOnly: bool) -> None:
|
showPublishedDateOnly: bool,
|
||||||
|
peertubeInstances: []) -> None:
|
||||||
"""Converts the json post into html and stores it in a cache
|
"""Converts the json post into html and stores it in a cache
|
||||||
This enables the post to be quickly displayed later
|
This enables the post to be quickly displayed later
|
||||||
"""
|
"""
|
||||||
|
@ -171,6 +172,7 @@ def _inboxStorePostToHtmlCache(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
avatarUrl, True, allowDeletion,
|
avatarUrl, True, allowDeletion,
|
||||||
httpPrefix, __version__, boxname, None,
|
httpPrefix, __version__, boxname, None,
|
||||||
showPublishedDateOnly,
|
showPublishedDateOnly,
|
||||||
|
peertubeInstances,
|
||||||
not isDM(postJsonObject),
|
not isDM(postJsonObject),
|
||||||
True, True, False, True)
|
True, True, False, True)
|
||||||
|
|
||||||
|
@ -2039,7 +2041,8 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
maxMentions: int, maxEmoji: int, translate: {},
|
maxMentions: int, maxEmoji: int, translate: {},
|
||||||
unitTest: bool, YTReplacementDomain: str,
|
unitTest: bool, YTReplacementDomain: str,
|
||||||
showPublishedDateOnly: bool,
|
showPublishedDateOnly: bool,
|
||||||
allowLocalNetworkAccess: bool) -> bool:
|
allowLocalNetworkAccess: bool,
|
||||||
|
peertubeInstances: []) -> bool:
|
||||||
""" Anything which needs to be done after initial checks have passed
|
""" Anything which needs to be done after initial checks have passed
|
||||||
"""
|
"""
|
||||||
actor = keyId
|
actor = keyId
|
||||||
|
@ -2346,7 +2349,8 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
postJsonObject,
|
postJsonObject,
|
||||||
allowDeletion,
|
allowDeletion,
|
||||||
boxname,
|
boxname,
|
||||||
showPublishedDateOnly)
|
showPublishedDateOnly,
|
||||||
|
peertubeInstances)
|
||||||
if debug:
|
if debug:
|
||||||
timeDiff = \
|
timeDiff = \
|
||||||
str(int((time.time() - htmlCacheStartTime) *
|
str(int((time.time() - htmlCacheStartTime) *
|
||||||
|
@ -2446,7 +2450,8 @@ def runInboxQueue(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
YTReplacementDomain: str,
|
YTReplacementDomain: str,
|
||||||
showPublishedDateOnly: bool,
|
showPublishedDateOnly: bool,
|
||||||
allowNewsFollowers: bool,
|
allowNewsFollowers: bool,
|
||||||
maxFollowers: int, allowLocalNetworkAccess: bool) -> None:
|
maxFollowers: int, allowLocalNetworkAccess: bool,
|
||||||
|
peertubeInstances: []) -> None:
|
||||||
"""Processes received items and moves them to the appropriate
|
"""Processes received items and moves them to the appropriate
|
||||||
directories
|
directories
|
||||||
"""
|
"""
|
||||||
|
@ -2863,7 +2868,8 @@ def runInboxQueue(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
translate, unitTest,
|
translate, unitTest,
|
||||||
YTReplacementDomain,
|
YTReplacementDomain,
|
||||||
showPublishedDateOnly,
|
showPublishedDateOnly,
|
||||||
allowLocalNetworkAccess)
|
allowLocalNetworkAccess,
|
||||||
|
peertubeInstances)
|
||||||
if debug:
|
if debug:
|
||||||
pprint(queueJson['post'])
|
pprint(queueJson['post'])
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,8 @@ def htmlConfirmDelete(cssCache: {},
|
||||||
wfRequest: {}, personCache: {},
|
wfRequest: {}, personCache: {},
|
||||||
callingDomain: str,
|
callingDomain: str,
|
||||||
YTReplacementDomain: str,
|
YTReplacementDomain: str,
|
||||||
showPublishedDateOnly: bool) -> str:
|
showPublishedDateOnly: bool,
|
||||||
|
peertubeInstances: []) -> str:
|
||||||
"""Shows a screen asking to confirm the deletion of a post
|
"""Shows a screen asking to confirm the deletion of a post
|
||||||
"""
|
"""
|
||||||
if '/statuses/' not in messageId:
|
if '/statuses/' not in messageId:
|
||||||
|
@ -66,6 +67,7 @@ def htmlConfirmDelete(cssCache: {},
|
||||||
httpPrefix, projectVersion, 'outbox',
|
httpPrefix, projectVersion, 'outbox',
|
||||||
YTReplacementDomain,
|
YTReplacementDomain,
|
||||||
showPublishedDateOnly,
|
showPublishedDateOnly,
|
||||||
|
peertubeInstances,
|
||||||
False, False, False, False, False)
|
False, False, False, False, False)
|
||||||
deletePostStr += '<center>'
|
deletePostStr += '<center>'
|
||||||
deletePostStr += \
|
deletePostStr += \
|
||||||
|
|
|
@ -27,7 +27,8 @@ def _htmlFrontScreenPosts(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
session, wfRequest: {}, personCache: {},
|
session, wfRequest: {}, personCache: {},
|
||||||
projectVersion: str,
|
projectVersion: str,
|
||||||
YTReplacementDomain: str,
|
YTReplacementDomain: str,
|
||||||
showPublishedDateOnly: bool) -> str:
|
showPublishedDateOnly: bool,
|
||||||
|
peertubeInstances: []) -> str:
|
||||||
"""Shows posts on the front screen of a news instance
|
"""Shows posts on the front screen of a news instance
|
||||||
These should only be public blog posts from the features timeline
|
These should only be public blog posts from the features timeline
|
||||||
which is the blog timeline of the news actor
|
which is the blog timeline of the news actor
|
||||||
|
@ -65,6 +66,7 @@ def _htmlFrontScreenPosts(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
httpPrefix, projectVersion, 'inbox',
|
httpPrefix, projectVersion, 'inbox',
|
||||||
YTReplacementDomain,
|
YTReplacementDomain,
|
||||||
showPublishedDateOnly,
|
showPublishedDateOnly,
|
||||||
|
peertubeInstances,
|
||||||
False, False, False, True, False)
|
False, False, False, True, False)
|
||||||
if postStr:
|
if postStr:
|
||||||
profileStr += postStr + separatorStr
|
profileStr += postStr + separatorStr
|
||||||
|
@ -85,7 +87,9 @@ def htmlFrontScreen(rssIconAtTop: bool,
|
||||||
session, wfRequest: {}, personCache: {},
|
session, wfRequest: {}, personCache: {},
|
||||||
YTReplacementDomain: str,
|
YTReplacementDomain: str,
|
||||||
showPublishedDateOnly: bool,
|
showPublishedDateOnly: bool,
|
||||||
newswire: {}, theme: str, extraJson=None,
|
newswire: {}, theme: str,
|
||||||
|
peertubeInstances: [],
|
||||||
|
extraJson=None,
|
||||||
pageNumber=None, maxItemsPerPage=None) -> str:
|
pageNumber=None, maxItemsPerPage=None) -> str:
|
||||||
"""Show the news instance front screen
|
"""Show the news instance front screen
|
||||||
"""
|
"""
|
||||||
|
@ -148,7 +152,8 @@ def htmlFrontScreen(rssIconAtTop: bool,
|
||||||
session, wfRequest, personCache,
|
session, wfRequest, personCache,
|
||||||
projectVersion,
|
projectVersion,
|
||||||
YTReplacementDomain,
|
YTReplacementDomain,
|
||||||
showPublishedDateOnly) + licenseStr
|
showPublishedDateOnly,
|
||||||
|
peertubeInstances) + licenseStr
|
||||||
|
|
||||||
# Footer which is only used for system accounts
|
# Footer which is only used for system accounts
|
||||||
profileFooterStr = ' </td>\n'
|
profileFooterStr = ' </td>\n'
|
||||||
|
|
|
@ -8,6 +8,7 @@ __status__ = "Production"
|
||||||
|
|
||||||
|
|
||||||
def _addEmbeddedVideoFromSites(translate: {}, content: str,
|
def _addEmbeddedVideoFromSites(translate: {}, content: str,
|
||||||
|
peertubeInstances: [],
|
||||||
width=400, height=300) -> str:
|
width=400, height=300) -> str:
|
||||||
"""Adds embedded videos
|
"""Adds embedded videos
|
||||||
"""
|
"""
|
||||||
|
@ -88,31 +89,38 @@ def _addEmbeddedVideoFromSites(translate: {}, content: str,
|
||||||
# and the content of each has not been reviewed, so mileage could vary
|
# and the content of each has not been reviewed, so mileage could vary
|
||||||
# Also see https://peertube_isolation.frama.io/list/ for
|
# Also see https://peertube_isolation.frama.io/list/ for
|
||||||
# adversarial instances
|
# adversarial instances
|
||||||
peerTubeSites = ('peertube.mastodon.host', 'share.tube',
|
if peertubeInstances:
|
||||||
'tube.tr4sk.me', 'videos.elbinario.net',
|
peerTubeSites = peertubeInstances
|
||||||
'hkvideo.live',
|
else:
|
||||||
'peertube.snargol.com', 'tube.22decembre.eu',
|
peerTubeSites = ('peertube.mastodon.host', 'share.tube',
|
||||||
'tube.fabrigli.fr', 'libretube.net', 'libre.video',
|
'tube.tr4sk.me', 'videos.elbinario.net',
|
||||||
'peertube.linuxrocks.online', 'spacepub.space',
|
'hkvideo.live',
|
||||||
'video.ploud.jp', 'video.omniatv.com',
|
'peertube.snargol.com', 'tube.22decembre.eu',
|
||||||
'peertube.servebeer.com',
|
'tube.fabrigli.fr', 'libretube.net',
|
||||||
'tube.tchncs.de', 'tubee.fr', 'video.alternanet.fr',
|
'libre.video',
|
||||||
'devtube.dev-wiki.de', 'video.samedi.pm',
|
'peertube.linuxrocks.online', 'spacepub.space',
|
||||||
'video.irem.univ-paris-diderot.fr',
|
'video.ploud.jp', 'video.omniatv.com',
|
||||||
'peertube.openstreetmap.fr', 'video.antopie.org',
|
'peertube.servebeer.com',
|
||||||
'scitech.video', 'tube.4aem.com', 'video.ploud.fr',
|
'tube.tchncs.de', 'tubee.fr',
|
||||||
'peervideo.net', 'video.valme.io',
|
'video.alternanet.fr',
|
||||||
'videos.pair2jeux.tube',
|
'devtube.dev-wiki.de', 'video.samedi.pm',
|
||||||
'vault.mle.party', 'hostyour.tv',
|
'video.irem.univ-paris-diderot.fr',
|
||||||
'diode.zone', 'visionon.tv',
|
'peertube.openstreetmap.fr', 'video.antopie.org',
|
||||||
'artitube.artifaille.fr', 'peertube.fr',
|
'scitech.video', 'tube.4aem.com',
|
||||||
'peertube.live', 'kolektiva.media',
|
'video.ploud.fr',
|
||||||
'tube.ac-lyon.fr', 'www.yiny.org', 'betamax.video',
|
'peervideo.net', 'video.valme.io',
|
||||||
'tube.piweb.be', 'pe.ertu.be', 'peertube.social',
|
'videos.pair2jeux.tube',
|
||||||
'videos.lescommuns.org', 'peertube.nogafa.org',
|
'vault.mle.party', 'hostyour.tv',
|
||||||
'skeptikon.fr', 'video.tedomum.net',
|
'diode.zone', 'visionon.tv',
|
||||||
'tube.p2p.legal', 'tilvids.com',
|
'artitube.artifaille.fr', 'peertube.fr',
|
||||||
'sikke.fi', 'exode.me', 'peertube.video')
|
'peertube.live', 'kolektiva.media',
|
||||||
|
'tube.ac-lyon.fr', 'www.yiny.org',
|
||||||
|
'betamax.video',
|
||||||
|
'tube.piweb.be', 'pe.ertu.be', 'peertube.social',
|
||||||
|
'videos.lescommuns.org', 'peertube.nogafa.org',
|
||||||
|
'skeptikon.fr', 'video.tedomum.net',
|
||||||
|
'tube.p2p.legal', 'tilvids.com',
|
||||||
|
'sikke.fi', 'exode.me', 'peertube.video')
|
||||||
for site in peerTubeSites:
|
for site in peerTubeSites:
|
||||||
if '"https://' + site in content:
|
if '"https://' + site in content:
|
||||||
url = content.split('"https://' + site)[1]
|
url = content.split('"https://' + site)[1]
|
||||||
|
@ -224,9 +232,11 @@ def _addEmbeddedVideo(translate: {}, content: str,
|
||||||
return content
|
return content
|
||||||
|
|
||||||
|
|
||||||
def addEmbeddedElements(translate: {}, content: str) -> str:
|
def addEmbeddedElements(translate: {}, content: str,
|
||||||
|
peertubeInstances: []) -> str:
|
||||||
"""Adds embedded elements for various media types
|
"""Adds embedded elements for various media types
|
||||||
"""
|
"""
|
||||||
content = _addEmbeddedVideoFromSites(translate, content)
|
content = _addEmbeddedVideoFromSites(translate, content,
|
||||||
|
peertubeInstances)
|
||||||
content = _addEmbeddedAudio(translate, content)
|
content = _addEmbeddedAudio(translate, content)
|
||||||
return _addEmbeddedVideo(translate, content)
|
return _addEmbeddedVideo(translate, content)
|
||||||
|
|
|
@ -37,7 +37,7 @@ def htmlModeration(cssCache: {}, defaultTimeline: str,
|
||||||
rssIconAtTop: bool,
|
rssIconAtTop: bool,
|
||||||
publishButtonAtTop: bool,
|
publishButtonAtTop: bool,
|
||||||
authorized: bool, moderationActionStr: str,
|
authorized: bool, moderationActionStr: str,
|
||||||
theme: str) -> str:
|
theme: str, peertubeInstances: []) -> str:
|
||||||
"""Show the moderation feed as html
|
"""Show the moderation feed as html
|
||||||
This is what you see when selecting the "mod" timeline
|
This is what you see when selecting the "mod" timeline
|
||||||
"""
|
"""
|
||||||
|
@ -51,7 +51,8 @@ def htmlModeration(cssCache: {}, defaultTimeline: str,
|
||||||
newswire, False, False, positiveVoting,
|
newswire, False, False, positiveVoting,
|
||||||
showPublishAsIcon, fullWidthTimelineButtonHeader,
|
showPublishAsIcon, fullWidthTimelineButtonHeader,
|
||||||
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
||||||
authorized, moderationActionStr, theme)
|
authorized, moderationActionStr, theme,
|
||||||
|
peertubeInstances)
|
||||||
|
|
||||||
|
|
||||||
def htmlAccountInfo(cssCache: {}, translate: {},
|
def htmlAccountInfo(cssCache: {}, translate: {},
|
||||||
|
|
|
@ -1076,6 +1076,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
httpPrefix: str, projectVersion: str,
|
httpPrefix: str, projectVersion: str,
|
||||||
boxName: str, YTReplacementDomain: str,
|
boxName: str, YTReplacementDomain: str,
|
||||||
showPublishedDateOnly: bool,
|
showPublishedDateOnly: bool,
|
||||||
|
peertubeInstances: [],
|
||||||
showRepeats=True,
|
showRepeats=True,
|
||||||
showIcons=False,
|
showIcons=False,
|
||||||
manuallyApprovesFollowers=False,
|
manuallyApprovesFollowers=False,
|
||||||
|
@ -1483,7 +1484,8 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
|
|
||||||
if not postIsSensitive:
|
if not postIsSensitive:
|
||||||
contentStr = objectContent + attachmentStr
|
contentStr = objectContent + attachmentStr
|
||||||
contentStr = addEmbeddedElements(translate, contentStr)
|
contentStr = addEmbeddedElements(translate, contentStr,
|
||||||
|
peertubeInstances)
|
||||||
contentStr = insertQuestion(baseDir, translate,
|
contentStr = insertQuestion(baseDir, translate,
|
||||||
nickname, domain, port,
|
nickname, domain, port,
|
||||||
contentStr, postJsonObject,
|
contentStr, postJsonObject,
|
||||||
|
@ -1499,7 +1501,8 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
# get the content warning text
|
# get the content warning text
|
||||||
cwContentStr = objectContent + attachmentStr
|
cwContentStr = objectContent + attachmentStr
|
||||||
if not isPatch:
|
if not isPatch:
|
||||||
cwContentStr = addEmbeddedElements(translate, cwContentStr)
|
cwContentStr = addEmbeddedElements(translate, cwContentStr,
|
||||||
|
peertubeInstances)
|
||||||
cwContentStr = \
|
cwContentStr = \
|
||||||
insertQuestion(baseDir, translate, nickname, domain, port,
|
insertQuestion(baseDir, translate, nickname, domain, port,
|
||||||
cwContentStr, postJsonObject, pageNumber)
|
cwContentStr, postJsonObject, pageNumber)
|
||||||
|
@ -1571,7 +1574,8 @@ def htmlIndividualPost(cssCache: {},
|
||||||
postJsonObject: {}, httpPrefix: str,
|
postJsonObject: {}, httpPrefix: str,
|
||||||
projectVersion: str, likedBy: str,
|
projectVersion: str, likedBy: str,
|
||||||
YTReplacementDomain: str,
|
YTReplacementDomain: str,
|
||||||
showPublishedDateOnly: bool) -> str:
|
showPublishedDateOnly: bool,
|
||||||
|
peertubeInstances: []) -> str:
|
||||||
"""Show an individual post as html
|
"""Show an individual post as html
|
||||||
"""
|
"""
|
||||||
postStr = ''
|
postStr = ''
|
||||||
|
@ -1611,6 +1615,7 @@ def htmlIndividualPost(cssCache: {},
|
||||||
httpPrefix, projectVersion, 'inbox',
|
httpPrefix, projectVersion, 'inbox',
|
||||||
YTReplacementDomain,
|
YTReplacementDomain,
|
||||||
showPublishedDateOnly,
|
showPublishedDateOnly,
|
||||||
|
peertubeInstances,
|
||||||
False, authorized, False, False, False)
|
False, authorized, False, False, False)
|
||||||
messageId = removeIdEnding(postJsonObject['id'])
|
messageId = removeIdEnding(postJsonObject['id'])
|
||||||
|
|
||||||
|
@ -1636,6 +1641,7 @@ def htmlIndividualPost(cssCache: {},
|
||||||
httpPrefix, projectVersion, 'inbox',
|
httpPrefix, projectVersion, 'inbox',
|
||||||
YTReplacementDomain,
|
YTReplacementDomain,
|
||||||
showPublishedDateOnly,
|
showPublishedDateOnly,
|
||||||
|
peertubeInstances,
|
||||||
False, authorized,
|
False, authorized,
|
||||||
False, False, False) + postStr
|
False, False, False) + postStr
|
||||||
|
|
||||||
|
@ -1664,6 +1670,7 @@ def htmlIndividualPost(cssCache: {},
|
||||||
httpPrefix, projectVersion, 'inbox',
|
httpPrefix, projectVersion, 'inbox',
|
||||||
YTReplacementDomain,
|
YTReplacementDomain,
|
||||||
showPublishedDateOnly,
|
showPublishedDateOnly,
|
||||||
|
peertubeInstances,
|
||||||
False, authorized,
|
False, authorized,
|
||||||
False, False, False)
|
False, False, False)
|
||||||
cssFilename = baseDir + '/epicyon-profile.css'
|
cssFilename = baseDir + '/epicyon-profile.css'
|
||||||
|
@ -1680,7 +1687,8 @@ def htmlPostReplies(cssCache: {},
|
||||||
nickname: str, domain: str, port: int, repliesJson: {},
|
nickname: str, domain: str, port: int, repliesJson: {},
|
||||||
httpPrefix: str, projectVersion: str,
|
httpPrefix: str, projectVersion: str,
|
||||||
YTReplacementDomain: str,
|
YTReplacementDomain: str,
|
||||||
showPublishedDateOnly: bool) -> str:
|
showPublishedDateOnly: bool,
|
||||||
|
peertubeInstances: []) -> str:
|
||||||
"""Show the replies to an individual post as html
|
"""Show the replies to an individual post as html
|
||||||
"""
|
"""
|
||||||
repliesStr = ''
|
repliesStr = ''
|
||||||
|
@ -1696,6 +1704,7 @@ def htmlPostReplies(cssCache: {},
|
||||||
httpPrefix, projectVersion, 'inbox',
|
httpPrefix, projectVersion, 'inbox',
|
||||||
YTReplacementDomain,
|
YTReplacementDomain,
|
||||||
showPublishedDateOnly,
|
showPublishedDateOnly,
|
||||||
|
peertubeInstances,
|
||||||
False, False, False, False, False)
|
False, False, False, False, False)
|
||||||
|
|
||||||
cssFilename = baseDir + '/epicyon-profile.css'
|
cssFilename = baseDir + '/epicyon-profile.css'
|
||||||
|
|
|
@ -59,7 +59,8 @@ def htmlProfileAfterSearch(cssCache: {},
|
||||||
debug: bool, projectVersion: str,
|
debug: bool, projectVersion: str,
|
||||||
YTReplacementDomain: str,
|
YTReplacementDomain: str,
|
||||||
showPublishedDateOnly: bool,
|
showPublishedDateOnly: bool,
|
||||||
defaultTimeline: str) -> str:
|
defaultTimeline: str,
|
||||||
|
peertubeInstances: []) -> str:
|
||||||
"""Show a profile page after a search for a fediverse address
|
"""Show a profile page after a search for a fediverse address
|
||||||
"""
|
"""
|
||||||
if hasUsersPath(profileHandle) or '/@' in profileHandle:
|
if hasUsersPath(profileHandle) or '/@' in profileHandle:
|
||||||
|
@ -276,6 +277,7 @@ def htmlProfileAfterSearch(cssCache: {},
|
||||||
httpPrefix, projectVersion, 'inbox',
|
httpPrefix, projectVersion, 'inbox',
|
||||||
YTReplacementDomain,
|
YTReplacementDomain,
|
||||||
showPublishedDateOnly,
|
showPublishedDateOnly,
|
||||||
|
peertubeInstances,
|
||||||
False, False, False, False, False)
|
False, False, False, False, False)
|
||||||
i += 1
|
i += 1
|
||||||
if i >= 20:
|
if i >= 20:
|
||||||
|
@ -369,6 +371,7 @@ def htmlProfile(rssIconAtTop: bool,
|
||||||
YTReplacementDomain: str,
|
YTReplacementDomain: str,
|
||||||
showPublishedDateOnly: bool,
|
showPublishedDateOnly: bool,
|
||||||
newswire: {}, theme: str, dormantMonths: int,
|
newswire: {}, theme: str, dormantMonths: int,
|
||||||
|
peertubeInstances: [],
|
||||||
extraJson=None, pageNumber=None,
|
extraJson=None, pageNumber=None,
|
||||||
maxItemsPerPage=None) -> str:
|
maxItemsPerPage=None) -> str:
|
||||||
"""Show the profile page as html
|
"""Show the profile page as html
|
||||||
|
@ -625,7 +628,8 @@ def htmlProfile(rssIconAtTop: bool,
|
||||||
session, wfRequest, personCache,
|
session, wfRequest, personCache,
|
||||||
projectVersion,
|
projectVersion,
|
||||||
YTReplacementDomain,
|
YTReplacementDomain,
|
||||||
showPublishedDateOnly) + licenseStr
|
showPublishedDateOnly,
|
||||||
|
peertubeInstances) + licenseStr
|
||||||
elif selected == 'following':
|
elif selected == 'following':
|
||||||
profileStr += \
|
profileStr += \
|
||||||
_htmlProfileFollowing(translate, baseDir, httpPrefix,
|
_htmlProfileFollowing(translate, baseDir, httpPrefix,
|
||||||
|
@ -671,7 +675,8 @@ def _htmlProfilePosts(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
session, wfRequest: {}, personCache: {},
|
session, wfRequest: {}, personCache: {},
|
||||||
projectVersion: str,
|
projectVersion: str,
|
||||||
YTReplacementDomain: str,
|
YTReplacementDomain: str,
|
||||||
showPublishedDateOnly: bool) -> str:
|
showPublishedDateOnly: bool,
|
||||||
|
peertubeInstances: []) -> str:
|
||||||
"""Shows posts on the profile screen
|
"""Shows posts on the profile screen
|
||||||
These should only be public posts
|
These should only be public posts
|
||||||
"""
|
"""
|
||||||
|
@ -709,6 +714,7 @@ def _htmlProfilePosts(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
httpPrefix, projectVersion, 'inbox',
|
httpPrefix, projectVersion, 'inbox',
|
||||||
YTReplacementDomain,
|
YTReplacementDomain,
|
||||||
showPublishedDateOnly,
|
showPublishedDateOnly,
|
||||||
|
peertubeInstances,
|
||||||
False, False, False, True, False)
|
False, False, False, True, False)
|
||||||
if postStr:
|
if postStr:
|
||||||
profileStr += postStr + separatorStr
|
profileStr += postStr + separatorStr
|
||||||
|
|
|
@ -506,7 +506,8 @@ def htmlHistorySearch(cssCache: {}, translate: {}, baseDir: str,
|
||||||
personCache: {},
|
personCache: {},
|
||||||
port: int,
|
port: int,
|
||||||
YTReplacementDomain: str,
|
YTReplacementDomain: str,
|
||||||
showPublishedDateOnly: bool) -> str:
|
showPublishedDateOnly: bool,
|
||||||
|
peertubeInstances: []) -> str:
|
||||||
"""Show a page containing search results for your post history
|
"""Show a page containing search results for your post history
|
||||||
"""
|
"""
|
||||||
if historysearch.startswith('!'):
|
if historysearch.startswith('!'):
|
||||||
|
@ -579,6 +580,7 @@ def htmlHistorySearch(cssCache: {}, translate: {}, baseDir: str,
|
||||||
'search',
|
'search',
|
||||||
YTReplacementDomain,
|
YTReplacementDomain,
|
||||||
showPublishedDateOnly,
|
showPublishedDateOnly,
|
||||||
|
peertubeInstances,
|
||||||
showIndividualPostIcons,
|
showIndividualPostIcons,
|
||||||
showIndividualPostIcons,
|
showIndividualPostIcons,
|
||||||
False, False, False)
|
False, False, False)
|
||||||
|
@ -599,7 +601,8 @@ def htmlHashtagSearch(cssCache: {},
|
||||||
session, wfRequest: {}, personCache: {},
|
session, wfRequest: {}, personCache: {},
|
||||||
httpPrefix: str, projectVersion: str,
|
httpPrefix: str, projectVersion: str,
|
||||||
YTReplacementDomain: str,
|
YTReplacementDomain: str,
|
||||||
showPublishedDateOnly: bool) -> str:
|
showPublishedDateOnly: bool,
|
||||||
|
peertubeInstances: []) -> str:
|
||||||
"""Show a page containing search results for a hashtag
|
"""Show a page containing search results for a hashtag
|
||||||
"""
|
"""
|
||||||
if hashtag.startswith('#'):
|
if hashtag.startswith('#'):
|
||||||
|
@ -745,6 +748,7 @@ def htmlHashtagSearch(cssCache: {},
|
||||||
'search',
|
'search',
|
||||||
YTReplacementDomain,
|
YTReplacementDomain,
|
||||||
showPublishedDateOnly,
|
showPublishedDateOnly,
|
||||||
|
peertubeInstances,
|
||||||
showRepeats, showIcons,
|
showRepeats, showIcons,
|
||||||
manuallyApprovesFollowers,
|
manuallyApprovesFollowers,
|
||||||
showPublicOnly,
|
showPublicOnly,
|
||||||
|
|
|
@ -61,7 +61,8 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
publishButtonAtTop: bool,
|
publishButtonAtTop: bool,
|
||||||
authorized: bool,
|
authorized: bool,
|
||||||
moderationActionStr: str,
|
moderationActionStr: str,
|
||||||
theme: str) -> str:
|
theme: str,
|
||||||
|
peertubeInstances: []) -> str:
|
||||||
"""Show the timeline as html
|
"""Show the timeline as html
|
||||||
"""
|
"""
|
||||||
enableTimingLog = False
|
enableTimingLog = False
|
||||||
|
@ -566,6 +567,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
boxName,
|
boxName,
|
||||||
YTReplacementDomain,
|
YTReplacementDomain,
|
||||||
showPublishedDateOnly,
|
showPublishedDateOnly,
|
||||||
|
peertubeInstances,
|
||||||
boxName != 'dm',
|
boxName != 'dm',
|
||||||
showIndividualPostIcons,
|
showIndividualPostIcons,
|
||||||
manuallyApproveFollowers,
|
manuallyApproveFollowers,
|
||||||
|
@ -720,7 +722,8 @@ def htmlShares(cssCache: {}, defaultTimeline: str,
|
||||||
iconsAsButtons: bool,
|
iconsAsButtons: bool,
|
||||||
rssIconAtTop: bool,
|
rssIconAtTop: bool,
|
||||||
publishButtonAtTop: bool,
|
publishButtonAtTop: bool,
|
||||||
authorized: bool, theme: str) -> str:
|
authorized: bool, theme: str,
|
||||||
|
peertubeInstances: []) -> str:
|
||||||
"""Show the shares timeline as html
|
"""Show the shares timeline as html
|
||||||
"""
|
"""
|
||||||
manuallyApproveFollowers = \
|
manuallyApproveFollowers = \
|
||||||
|
@ -739,7 +742,7 @@ def htmlShares(cssCache: {}, defaultTimeline: str,
|
||||||
positiveVoting, showPublishAsIcon,
|
positiveVoting, showPublishAsIcon,
|
||||||
fullWidthTimelineButtonHeader,
|
fullWidthTimelineButtonHeader,
|
||||||
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
||||||
authorized, None, theme)
|
authorized, None, theme, peertubeInstances)
|
||||||
|
|
||||||
|
|
||||||
def htmlInbox(cssCache: {}, defaultTimeline: str,
|
def htmlInbox(cssCache: {}, defaultTimeline: str,
|
||||||
|
@ -757,7 +760,8 @@ def htmlInbox(cssCache: {}, defaultTimeline: str,
|
||||||
iconsAsButtons: bool,
|
iconsAsButtons: bool,
|
||||||
rssIconAtTop: bool,
|
rssIconAtTop: bool,
|
||||||
publishButtonAtTop: bool,
|
publishButtonAtTop: bool,
|
||||||
authorized: bool, theme: str) -> str:
|
authorized: bool, theme: str,
|
||||||
|
peertubeInstances: []) -> str:
|
||||||
"""Show the inbox as html
|
"""Show the inbox as html
|
||||||
"""
|
"""
|
||||||
manuallyApproveFollowers = \
|
manuallyApproveFollowers = \
|
||||||
|
@ -776,7 +780,7 @@ def htmlInbox(cssCache: {}, defaultTimeline: str,
|
||||||
positiveVoting, showPublishAsIcon,
|
positiveVoting, showPublishAsIcon,
|
||||||
fullWidthTimelineButtonHeader,
|
fullWidthTimelineButtonHeader,
|
||||||
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
||||||
authorized, None, theme)
|
authorized, None, theme, peertubeInstances)
|
||||||
|
|
||||||
|
|
||||||
def htmlBookmarks(cssCache: {}, defaultTimeline: str,
|
def htmlBookmarks(cssCache: {}, defaultTimeline: str,
|
||||||
|
@ -794,7 +798,8 @@ def htmlBookmarks(cssCache: {}, defaultTimeline: str,
|
||||||
iconsAsButtons: bool,
|
iconsAsButtons: bool,
|
||||||
rssIconAtTop: bool,
|
rssIconAtTop: bool,
|
||||||
publishButtonAtTop: bool,
|
publishButtonAtTop: bool,
|
||||||
authorized: bool, theme: str) -> str:
|
authorized: bool, theme: str,
|
||||||
|
peertubeInstances: []) -> str:
|
||||||
"""Show the bookmarks as html
|
"""Show the bookmarks as html
|
||||||
"""
|
"""
|
||||||
manuallyApproveFollowers = \
|
manuallyApproveFollowers = \
|
||||||
|
@ -813,7 +818,7 @@ def htmlBookmarks(cssCache: {}, defaultTimeline: str,
|
||||||
positiveVoting, showPublishAsIcon,
|
positiveVoting, showPublishAsIcon,
|
||||||
fullWidthTimelineButtonHeader,
|
fullWidthTimelineButtonHeader,
|
||||||
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
||||||
authorized, None, theme)
|
authorized, None, theme, peertubeInstances)
|
||||||
|
|
||||||
|
|
||||||
def htmlEvents(cssCache: {}, defaultTimeline: str,
|
def htmlEvents(cssCache: {}, defaultTimeline: str,
|
||||||
|
@ -831,7 +836,8 @@ def htmlEvents(cssCache: {}, defaultTimeline: str,
|
||||||
iconsAsButtons: bool,
|
iconsAsButtons: bool,
|
||||||
rssIconAtTop: bool,
|
rssIconAtTop: bool,
|
||||||
publishButtonAtTop: bool,
|
publishButtonAtTop: bool,
|
||||||
authorized: bool, theme: str) -> str:
|
authorized: bool, theme: str,
|
||||||
|
peertubeInstances: []) -> str:
|
||||||
"""Show the events as html
|
"""Show the events as html
|
||||||
"""
|
"""
|
||||||
manuallyApproveFollowers = \
|
manuallyApproveFollowers = \
|
||||||
|
@ -850,7 +856,7 @@ def htmlEvents(cssCache: {}, defaultTimeline: str,
|
||||||
positiveVoting, showPublishAsIcon,
|
positiveVoting, showPublishAsIcon,
|
||||||
fullWidthTimelineButtonHeader,
|
fullWidthTimelineButtonHeader,
|
||||||
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
||||||
authorized, None, theme)
|
authorized, None, theme, peertubeInstances)
|
||||||
|
|
||||||
|
|
||||||
def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
|
def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
|
||||||
|
@ -868,7 +874,8 @@ def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
|
||||||
iconsAsButtons: bool,
|
iconsAsButtons: bool,
|
||||||
rssIconAtTop: bool,
|
rssIconAtTop: bool,
|
||||||
publishButtonAtTop: bool,
|
publishButtonAtTop: bool,
|
||||||
authorized: bool, theme: str) -> str:
|
authorized: bool, theme: str,
|
||||||
|
peertubeInstances: []) -> str:
|
||||||
"""Show the DM timeline as html
|
"""Show the DM timeline as html
|
||||||
"""
|
"""
|
||||||
return htmlTimeline(cssCache, defaultTimeline,
|
return htmlTimeline(cssCache, defaultTimeline,
|
||||||
|
@ -882,7 +889,7 @@ def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
|
||||||
showPublishAsIcon,
|
showPublishAsIcon,
|
||||||
fullWidthTimelineButtonHeader,
|
fullWidthTimelineButtonHeader,
|
||||||
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
||||||
authorized, None, theme)
|
authorized, None, theme, peertubeInstances)
|
||||||
|
|
||||||
|
|
||||||
def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
|
def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
|
||||||
|
@ -900,7 +907,8 @@ def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
|
||||||
iconsAsButtons: bool,
|
iconsAsButtons: bool,
|
||||||
rssIconAtTop: bool,
|
rssIconAtTop: bool,
|
||||||
publishButtonAtTop: bool,
|
publishButtonAtTop: bool,
|
||||||
authorized: bool, theme: str) -> str:
|
authorized: bool, theme: str,
|
||||||
|
peertubeInstances: []) -> str:
|
||||||
"""Show the replies timeline as html
|
"""Show the replies timeline as html
|
||||||
"""
|
"""
|
||||||
return htmlTimeline(cssCache, defaultTimeline,
|
return htmlTimeline(cssCache, defaultTimeline,
|
||||||
|
@ -915,7 +923,7 @@ def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
|
||||||
positiveVoting, showPublishAsIcon,
|
positiveVoting, showPublishAsIcon,
|
||||||
fullWidthTimelineButtonHeader,
|
fullWidthTimelineButtonHeader,
|
||||||
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
||||||
authorized, None, theme)
|
authorized, None, theme, peertubeInstances)
|
||||||
|
|
||||||
|
|
||||||
def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
|
def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
|
||||||
|
@ -933,7 +941,8 @@ def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
|
||||||
iconsAsButtons: bool,
|
iconsAsButtons: bool,
|
||||||
rssIconAtTop: bool,
|
rssIconAtTop: bool,
|
||||||
publishButtonAtTop: bool,
|
publishButtonAtTop: bool,
|
||||||
authorized: bool, theme: str) -> str:
|
authorized: bool, theme: str,
|
||||||
|
peertubeInstances: []) -> str:
|
||||||
"""Show the media timeline as html
|
"""Show the media timeline as html
|
||||||
"""
|
"""
|
||||||
return htmlTimeline(cssCache, defaultTimeline,
|
return htmlTimeline(cssCache, defaultTimeline,
|
||||||
|
@ -948,7 +957,7 @@ def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
|
||||||
positiveVoting, showPublishAsIcon,
|
positiveVoting, showPublishAsIcon,
|
||||||
fullWidthTimelineButtonHeader,
|
fullWidthTimelineButtonHeader,
|
||||||
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
||||||
authorized, None, theme)
|
authorized, None, theme, peertubeInstances)
|
||||||
|
|
||||||
|
|
||||||
def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
|
def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
|
||||||
|
@ -966,7 +975,8 @@ def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
|
||||||
iconsAsButtons: bool,
|
iconsAsButtons: bool,
|
||||||
rssIconAtTop: bool,
|
rssIconAtTop: bool,
|
||||||
publishButtonAtTop: bool,
|
publishButtonAtTop: bool,
|
||||||
authorized: bool, theme: str) -> str:
|
authorized: bool, theme: str,
|
||||||
|
peertubeInstances: []) -> str:
|
||||||
"""Show the blogs timeline as html
|
"""Show the blogs timeline as html
|
||||||
"""
|
"""
|
||||||
return htmlTimeline(cssCache, defaultTimeline,
|
return htmlTimeline(cssCache, defaultTimeline,
|
||||||
|
@ -981,7 +991,7 @@ def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
|
||||||
positiveVoting, showPublishAsIcon,
|
positiveVoting, showPublishAsIcon,
|
||||||
fullWidthTimelineButtonHeader,
|
fullWidthTimelineButtonHeader,
|
||||||
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
||||||
authorized, None, theme)
|
authorized, None, theme, peertubeInstances)
|
||||||
|
|
||||||
|
|
||||||
def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
|
def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
|
||||||
|
@ -1000,7 +1010,8 @@ def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
|
||||||
rssIconAtTop: bool,
|
rssIconAtTop: bool,
|
||||||
publishButtonAtTop: bool,
|
publishButtonAtTop: bool,
|
||||||
authorized: bool,
|
authorized: bool,
|
||||||
theme: str) -> str:
|
theme: str,
|
||||||
|
peertubeInstances: []) -> str:
|
||||||
"""Show the features timeline as html
|
"""Show the features timeline as html
|
||||||
"""
|
"""
|
||||||
return htmlTimeline(cssCache, defaultTimeline,
|
return htmlTimeline(cssCache, defaultTimeline,
|
||||||
|
@ -1015,7 +1026,7 @@ def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
|
||||||
positiveVoting, showPublishAsIcon,
|
positiveVoting, showPublishAsIcon,
|
||||||
fullWidthTimelineButtonHeader,
|
fullWidthTimelineButtonHeader,
|
||||||
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
||||||
authorized, None, theme)
|
authorized, None, theme, peertubeInstances)
|
||||||
|
|
||||||
|
|
||||||
def htmlInboxNews(cssCache: {}, defaultTimeline: str,
|
def htmlInboxNews(cssCache: {}, defaultTimeline: str,
|
||||||
|
@ -1033,7 +1044,8 @@ def htmlInboxNews(cssCache: {}, defaultTimeline: str,
|
||||||
iconsAsButtons: bool,
|
iconsAsButtons: bool,
|
||||||
rssIconAtTop: bool,
|
rssIconAtTop: bool,
|
||||||
publishButtonAtTop: bool,
|
publishButtonAtTop: bool,
|
||||||
authorized: bool, theme: str) -> str:
|
authorized: bool, theme: str,
|
||||||
|
peertubeInstances: []) -> str:
|
||||||
"""Show the news timeline as html
|
"""Show the news timeline as html
|
||||||
"""
|
"""
|
||||||
return htmlTimeline(cssCache, defaultTimeline,
|
return htmlTimeline(cssCache, defaultTimeline,
|
||||||
|
@ -1048,7 +1060,7 @@ def htmlInboxNews(cssCache: {}, defaultTimeline: str,
|
||||||
positiveVoting, showPublishAsIcon,
|
positiveVoting, showPublishAsIcon,
|
||||||
fullWidthTimelineButtonHeader,
|
fullWidthTimelineButtonHeader,
|
||||||
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
||||||
authorized, None, theme)
|
authorized, None, theme, peertubeInstances)
|
||||||
|
|
||||||
|
|
||||||
def htmlOutbox(cssCache: {}, defaultTimeline: str,
|
def htmlOutbox(cssCache: {}, defaultTimeline: str,
|
||||||
|
@ -1066,7 +1078,8 @@ def htmlOutbox(cssCache: {}, defaultTimeline: str,
|
||||||
iconsAsButtons: bool,
|
iconsAsButtons: bool,
|
||||||
rssIconAtTop: bool,
|
rssIconAtTop: bool,
|
||||||
publishButtonAtTop: bool,
|
publishButtonAtTop: bool,
|
||||||
authorized: bool, theme: str) -> str:
|
authorized: bool, theme: str,
|
||||||
|
peertubeInstances: []) -> str:
|
||||||
"""Show the Outbox as html
|
"""Show the Outbox as html
|
||||||
"""
|
"""
|
||||||
manuallyApproveFollowers = \
|
manuallyApproveFollowers = \
|
||||||
|
@ -1082,4 +1095,4 @@ def htmlOutbox(cssCache: {}, defaultTimeline: str,
|
||||||
newswire, False, False, positiveVoting,
|
newswire, False, False, positiveVoting,
|
||||||
showPublishAsIcon, fullWidthTimelineButtonHeader,
|
showPublishAsIcon, fullWidthTimelineButtonHeader,
|
||||||
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
iconsAsButtons, rssIconAtTop, publishButtonAtTop,
|
||||||
authorized, None, theme)
|
authorized, None, theme, peertubeInstances)
|
||||||
|
|
Loading…
Reference in New Issue