mirror of https://gitlab.com/bashrc2/epicyon
Snake case
parent
8c6b0f3149
commit
5afc4e9e9b
|
@ -1007,11 +1007,11 @@ def loadCWLists(base_dir: str, verbose: bool) -> {}:
|
||||||
|
|
||||||
|
|
||||||
def addCWfromLists(postJsonObject: {}, CWlists: {}, translate: {},
|
def addCWfromLists(postJsonObject: {}, CWlists: {}, translate: {},
|
||||||
listsEnabled: str) -> None:
|
lists_enabled: str) -> None:
|
||||||
"""Adds content warnings by matching the post content
|
"""Adds content warnings by matching the post content
|
||||||
against domains or keywords
|
against domains or keywords
|
||||||
"""
|
"""
|
||||||
if not listsEnabled:
|
if not lists_enabled:
|
||||||
return
|
return
|
||||||
if not postJsonObject['object'].get('content'):
|
if not postJsonObject['object'].get('content'):
|
||||||
return
|
return
|
||||||
|
@ -1021,7 +1021,7 @@ def addCWfromLists(postJsonObject: {}, CWlists: {}, translate: {},
|
||||||
|
|
||||||
content = postJsonObject['object']['content']
|
content = postJsonObject['object']['content']
|
||||||
for name, item in CWlists.items():
|
for name, item in CWlists.items():
|
||||||
if name not in listsEnabled:
|
if name not in lists_enabled:
|
||||||
continue
|
continue
|
||||||
if not item.get('warning'):
|
if not item.get('warning'):
|
||||||
continue
|
continue
|
||||||
|
|
100
daemon.py
100
daemon.py
|
@ -1307,7 +1307,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.maxLikeCount,
|
self.server.maxLikeCount,
|
||||||
self.server.maxRecentPosts,
|
self.server.maxRecentPosts,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled,
|
self.server.lists_enabled,
|
||||||
self.server.content_license_url)
|
self.server.content_license_url)
|
||||||
|
|
||||||
def _getOutboxThreadIndex(self, nickname: str,
|
def _getOutboxThreadIndex(self, nickname: str,
|
||||||
|
@ -2729,7 +2729,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.maxLikeCount,
|
self.server.maxLikeCount,
|
||||||
self.server.signingPrivateKeyPem,
|
self.server.signingPrivateKeyPem,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled,
|
self.server.lists_enabled,
|
||||||
self.server.defaultTimeline).encode('utf-8')
|
self.server.defaultTimeline).encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html', msglen,
|
self._set_headers('text/html', msglen,
|
||||||
|
@ -2863,7 +2863,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.maxLikeCount,
|
self.server.maxLikeCount,
|
||||||
self.server.signingPrivateKeyPem,
|
self.server.signingPrivateKeyPem,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled,
|
self.server.lists_enabled,
|
||||||
self.server.defaultTimeline).encode('utf-8')
|
self.server.defaultTimeline).encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html', msglen,
|
self._set_headers('text/html', msglen,
|
||||||
|
@ -3313,7 +3313,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.maxLikeCount,
|
self.server.maxLikeCount,
|
||||||
self.server.signingPrivateKeyPem,
|
self.server.signingPrivateKeyPem,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
if hashtagStr:
|
if hashtagStr:
|
||||||
msg = hashtagStr.encode('utf-8')
|
msg = hashtagStr.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
|
@ -3408,7 +3408,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.maxLikeCount,
|
self.server.maxLikeCount,
|
||||||
self.server.signingPrivateKeyPem,
|
self.server.signingPrivateKeyPem,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
if historyStr:
|
if historyStr:
|
||||||
msg = historyStr.encode('utf-8')
|
msg = historyStr.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
|
@ -3476,7 +3476,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.maxLikeCount,
|
self.server.maxLikeCount,
|
||||||
self.server.signingPrivateKeyPem,
|
self.server.signingPrivateKeyPem,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
if bookmarksStr:
|
if bookmarksStr:
|
||||||
msg = bookmarksStr.encode('utf-8')
|
msg = bookmarksStr.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
|
@ -3575,7 +3575,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.maxLikeCount,
|
self.server.maxLikeCount,
|
||||||
signingPrivateKeyPem,
|
signingPrivateKeyPem,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
if profileStr:
|
if profileStr:
|
||||||
msg = profileStr.encode('utf-8')
|
msg = profileStr.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
|
@ -6388,10 +6388,10 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
newListsEnabled += ', ' + name
|
newListsEnabled += ', ' + name
|
||||||
else:
|
else:
|
||||||
newListsEnabled += name
|
newListsEnabled += name
|
||||||
if newListsEnabled != self.server.listsEnabled:
|
if newListsEnabled != self.server.lists_enabled:
|
||||||
self.server.listsEnabled = newListsEnabled
|
self.server.lists_enabled = newListsEnabled
|
||||||
setConfigParam(self.server.base_dir,
|
setConfigParam(self.server.base_dir,
|
||||||
"listsEnabled",
|
"lists_enabled",
|
||||||
newListsEnabled)
|
newListsEnabled)
|
||||||
|
|
||||||
# save blocked user agents
|
# save blocked user agents
|
||||||
|
@ -7550,7 +7550,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.maxLikeCount,
|
self.server.maxLikeCount,
|
||||||
self.server.signingPrivateKeyPem,
|
self.server.signingPrivateKeyPem,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
if hashtagStr:
|
if hashtagStr:
|
||||||
msg = hashtagStr.encode('utf-8')
|
msg = hashtagStr.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
|
@ -7765,7 +7765,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
manuallyApproveFollowers,
|
manuallyApproveFollowers,
|
||||||
False, True, False,
|
False, True, False,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
|
|
||||||
actorAbsolute = self._getInstanceUrl(callingDomain) + actor
|
actorAbsolute = self._getInstanceUrl(callingDomain) + actor
|
||||||
actorPathStr = \
|
actorPathStr = \
|
||||||
|
@ -8225,7 +8225,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
manuallyApproveFollowers,
|
manuallyApproveFollowers,
|
||||||
False, True, False,
|
False, True, False,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
else:
|
else:
|
||||||
print('WARN: Liked post not found: ' + likedPostFilename)
|
print('WARN: Liked post not found: ' + likedPostFilename)
|
||||||
# clear the icon from the cache so that it gets updated
|
# clear the icon from the cache so that it gets updated
|
||||||
|
@ -8379,7 +8379,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
manuallyApproveFollowers,
|
manuallyApproveFollowers,
|
||||||
False, True, False,
|
False, True, False,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
else:
|
else:
|
||||||
print('WARN: Unliked post not found: ' + likedPostFilename)
|
print('WARN: Unliked post not found: ' + likedPostFilename)
|
||||||
# clear the icon from the cache so that it gets updated
|
# clear the icon from the cache so that it gets updated
|
||||||
|
@ -8563,7 +8563,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
manuallyApproveFollowers,
|
manuallyApproveFollowers,
|
||||||
False, True, False,
|
False, True, False,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
else:
|
else:
|
||||||
print('WARN: Emoji reaction post not found: ' +
|
print('WARN: Emoji reaction post not found: ' +
|
||||||
reactionPostFilename)
|
reactionPostFilename)
|
||||||
|
@ -8735,7 +8735,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
manuallyApproveFollowers,
|
manuallyApproveFollowers,
|
||||||
False, True, False,
|
False, True, False,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
else:
|
else:
|
||||||
print('WARN: Unreaction post not found: ' +
|
print('WARN: Unreaction post not found: ' +
|
||||||
reactionPostFilename)
|
reactionPostFilename)
|
||||||
|
@ -8830,7 +8830,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.maxLikeCount,
|
self.server.maxLikeCount,
|
||||||
self.server.signingPrivateKeyPem,
|
self.server.signingPrivateKeyPem,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled,
|
self.server.lists_enabled,
|
||||||
timelineStr, pageNumber)
|
timelineStr, pageNumber)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
|
@ -8955,7 +8955,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
manuallyApproveFollowers,
|
manuallyApproveFollowers,
|
||||||
False, True, False,
|
False, True, False,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
else:
|
else:
|
||||||
print('WARN: Bookmarked post not found: ' + bookmarkFilename)
|
print('WARN: Bookmarked post not found: ' + bookmarkFilename)
|
||||||
# self._postToOutbox(bookmarkJson, self.server.projectVersion, None)
|
# self._postToOutbox(bookmarkJson, self.server.projectVersion, None)
|
||||||
|
@ -9083,7 +9083,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
manuallyApproveFollowers,
|
manuallyApproveFollowers,
|
||||||
False, True, False,
|
False, True, False,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
else:
|
else:
|
||||||
print('WARN: Unbookmarked post not found: ' + bookmarkFilename)
|
print('WARN: Unbookmarked post not found: ' + bookmarkFilename)
|
||||||
actorAbsolute = self._getInstanceUrl(callingDomain) + actor
|
actorAbsolute = self._getInstanceUrl(callingDomain) + actor
|
||||||
|
@ -9177,7 +9177,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.maxLikeCount,
|
self.server.maxLikeCount,
|
||||||
self.server.signingPrivateKeyPem,
|
self.server.signingPrivateKeyPem,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
if deleteStr:
|
if deleteStr:
|
||||||
deleteStrLen = len(deleteStr)
|
deleteStrLen = len(deleteStr)
|
||||||
self._set_headers('text/html', deleteStrLen,
|
self._set_headers('text/html', deleteStrLen,
|
||||||
|
@ -9286,7 +9286,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
showPublicOnly, storeToCache,
|
showPublicOnly, storeToCache,
|
||||||
useCacheOnly,
|
useCacheOnly,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
else:
|
else:
|
||||||
print('WARN: Muted post not found: ' + muteFilename)
|
print('WARN: Muted post not found: ' + muteFilename)
|
||||||
|
|
||||||
|
@ -9396,7 +9396,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
showPublicOnly, storeToCache,
|
showPublicOnly, storeToCache,
|
||||||
useCacheOnly,
|
useCacheOnly,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
else:
|
else:
|
||||||
print('WARN: Unmuted post not found: ' + muteFilename)
|
print('WARN: Unmuted post not found: ' + muteFilename)
|
||||||
if callingDomain.endswith('.onion') and onionDomain:
|
if callingDomain.endswith('.onion') and onionDomain:
|
||||||
|
@ -9514,7 +9514,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.maxLikeCount,
|
self.server.maxLikeCount,
|
||||||
self.server.signingPrivateKeyPem,
|
self.server.signingPrivateKeyPem,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
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,
|
||||||
|
@ -9606,7 +9606,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.maxLikeCount,
|
self.server.maxLikeCount,
|
||||||
self.server.signingPrivateKeyPem,
|
self.server.signingPrivateKeyPem,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
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,
|
||||||
|
@ -9715,7 +9715,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.shared_items_federated_domains,
|
self.server.shared_items_federated_domains,
|
||||||
rolesList,
|
rolesList,
|
||||||
None, None, self.server.CWlists,
|
None, None, self.server.CWlists,
|
||||||
self.server.listsEnabled,
|
self.server.lists_enabled,
|
||||||
self.server.content_license_url)
|
self.server.content_license_url)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
|
@ -9832,7 +9832,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
skills,
|
skills,
|
||||||
None, None,
|
None, None,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled,
|
self.server.lists_enabled,
|
||||||
content_license_url)
|
content_license_url)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
|
@ -9996,7 +9996,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.maxLikeCount,
|
self.server.maxLikeCount,
|
||||||
self.server.signingPrivateKeyPem,
|
self.server.signingPrivateKeyPem,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
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,
|
||||||
|
@ -10261,7 +10261,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
shared_items_federated_domains,
|
shared_items_federated_domains,
|
||||||
self.server.signingPrivateKeyPem,
|
self.server.signingPrivateKeyPem,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
if GETstartTime:
|
if GETstartTime:
|
||||||
fitnessPerformance(GETstartTime,
|
fitnessPerformance(GETstartTime,
|
||||||
self.server.fitness,
|
self.server.fitness,
|
||||||
|
@ -10409,7 +10409,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
shared_items_federated_domains,
|
shared_items_federated_domains,
|
||||||
self.server.signingPrivateKeyPem,
|
self.server.signingPrivateKeyPem,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
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,
|
||||||
|
@ -10550,7 +10550,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
shared_items_federated_domains,
|
shared_items_federated_domains,
|
||||||
self.server.signingPrivateKeyPem,
|
self.server.signingPrivateKeyPem,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
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,
|
||||||
|
@ -10692,7 +10692,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
fed_domains,
|
fed_domains,
|
||||||
self.server.signingPrivateKeyPem,
|
self.server.signingPrivateKeyPem,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
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,
|
||||||
|
@ -10834,7 +10834,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
fed_domains,
|
fed_domains,
|
||||||
self.server.signingPrivateKeyPem,
|
self.server.signingPrivateKeyPem,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
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,
|
||||||
|
@ -10986,7 +10986,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
fed_domains,
|
fed_domains,
|
||||||
self.server.signingPrivateKeyPem,
|
self.server.signingPrivateKeyPem,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
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,
|
||||||
|
@ -11133,7 +11133,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
shared_items_federated_domains,
|
shared_items_federated_domains,
|
||||||
self.server.signingPrivateKeyPem,
|
self.server.signingPrivateKeyPem,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
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,
|
||||||
|
@ -11239,7 +11239,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.shared_items_federated_domains,
|
self.server.shared_items_federated_domains,
|
||||||
self.server.signingPrivateKeyPem,
|
self.server.signingPrivateKeyPem,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
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,
|
||||||
|
@ -11323,7 +11323,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.shared_items_federated_domains,
|
self.server.shared_items_federated_domains,
|
||||||
self.server.signingPrivateKeyPem,
|
self.server.signingPrivateKeyPem,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
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,
|
||||||
|
@ -11444,7 +11444,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
shared_items_federated_domains,
|
shared_items_federated_domains,
|
||||||
self.server.signingPrivateKeyPem,
|
self.server.signingPrivateKeyPem,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
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,
|
||||||
|
@ -11582,7 +11582,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.shared_items_federated_domains,
|
self.server.shared_items_federated_domains,
|
||||||
self.server.signingPrivateKeyPem,
|
self.server.signingPrivateKeyPem,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
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,
|
||||||
|
@ -11712,7 +11712,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
shared_items_federated_domains,
|
shared_items_federated_domains,
|
||||||
self.server.signingPrivateKeyPem,
|
self.server.signingPrivateKeyPem,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled)
|
self.server.lists_enabled)
|
||||||
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,
|
||||||
|
@ -11834,7 +11834,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
shares,
|
shares,
|
||||||
pageNumber, sharesPerPage,
|
pageNumber, sharesPerPage,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled,
|
self.server.lists_enabled,
|
||||||
self.server.content_license_url)
|
self.server.content_license_url)
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
|
@ -11956,7 +11956,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
pageNumber,
|
pageNumber,
|
||||||
followsPerPage,
|
followsPerPage,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled,
|
self.server.lists_enabled,
|
||||||
content_license_url).encode('utf-8')
|
content_license_url).encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html',
|
self._set_headers('text/html',
|
||||||
|
@ -12076,7 +12076,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
pageNumber,
|
pageNumber,
|
||||||
followsPerPage,
|
followsPerPage,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled,
|
self.server.lists_enabled,
|
||||||
content_license_url).encode('utf-8')
|
content_license_url).encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html', msglen,
|
self._set_headers('text/html', msglen,
|
||||||
|
@ -12210,7 +12210,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.shared_items_federated_domains,
|
self.server.shared_items_federated_domains,
|
||||||
None, None, None,
|
None, None, None,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled,
|
self.server.lists_enabled,
|
||||||
self.server.content_license_url).encode('utf-8')
|
self.server.content_license_url).encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html', msglen,
|
self._set_headers('text/html', msglen,
|
||||||
|
@ -12970,7 +12970,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.maxLikeCount,
|
self.server.maxLikeCount,
|
||||||
self.server.signingPrivateKeyPem,
|
self.server.signingPrivateKeyPem,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled,
|
self.server.lists_enabled,
|
||||||
self.server.defaultTimeline).encode('utf-8')
|
self.server.defaultTimeline).encode('utf-8')
|
||||||
if not msg:
|
if not msg:
|
||||||
print('Error replying to ' + inReplyToUrl)
|
print('Error replying to ' + inReplyToUrl)
|
||||||
|
@ -13054,7 +13054,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
accessKeys,
|
accessKeys,
|
||||||
default_reply_interval_hrs,
|
default_reply_interval_hrs,
|
||||||
self.server.CWlists,
|
self.server.CWlists,
|
||||||
self.server.listsEnabled).encode('utf-8')
|
self.server.lists_enabled).encode('utf-8')
|
||||||
if msg:
|
if msg:
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('text/html', msglen,
|
self._set_headers('text/html', msglen,
|
||||||
|
@ -18400,7 +18400,7 @@ def loadTokens(base_dir: str, tokensDict: {}, tokensLookup: {}) -> None:
|
||||||
|
|
||||||
|
|
||||||
def runDaemon(content_license_url: str,
|
def runDaemon(content_license_url: str,
|
||||||
listsEnabled: str,
|
lists_enabled: str,
|
||||||
default_reply_interval_hrs: int,
|
default_reply_interval_hrs: int,
|
||||||
lowBandwidth: bool,
|
lowBandwidth: bool,
|
||||||
maxLikeCount: int,
|
maxLikeCount: int,
|
||||||
|
@ -18763,7 +18763,7 @@ def runDaemon(content_license_url: str,
|
||||||
if not os.path.isdir(base_dir + '/accounts/news@' + domain):
|
if not os.path.isdir(base_dir + '/accounts/news@' + domain):
|
||||||
print('Creating news inbox: news@' + domain)
|
print('Creating news inbox: news@' + domain)
|
||||||
createNewsInbox(base_dir, domain, port, http_prefix)
|
createNewsInbox(base_dir, domain, port, http_prefix)
|
||||||
setConfigParam(base_dir, "listsEnabled", "Murdoch press")
|
setConfigParam(base_dir, "lists_enabled", "Murdoch press")
|
||||||
|
|
||||||
# dict of known web crawlers accessing nodeinfo or the masto API
|
# dict of known web crawlers accessing nodeinfo or the masto API
|
||||||
# and how many times they have been seen
|
# and how many times they have been seen
|
||||||
|
@ -18774,10 +18774,10 @@ def runDaemon(content_license_url: str,
|
||||||
# when was the last crawler seen?
|
# when was the last crawler seen?
|
||||||
httpd.lastKnownCrawler = 0
|
httpd.lastKnownCrawler = 0
|
||||||
|
|
||||||
if listsEnabled:
|
if lists_enabled:
|
||||||
httpd.listsEnabled = listsEnabled
|
httpd.lists_enabled = lists_enabled
|
||||||
else:
|
else:
|
||||||
httpd.listsEnabled = getConfigParam(base_dir, "listsEnabled")
|
httpd.lists_enabled = getConfigParam(base_dir, "lists_enabled")
|
||||||
httpd.CWlists = loadCWLists(base_dir, True)
|
httpd.CWlists = loadCWLists(base_dir, True)
|
||||||
|
|
||||||
# set the avatar for the news account
|
# set the avatar for the news account
|
||||||
|
|
14
epicyon.py
14
epicyon.py
|
@ -119,7 +119,7 @@ parser = argparse.ArgumentParser(description='ActivityPub Server')
|
||||||
parser.add_argument('--content_license_url', type=str,
|
parser.add_argument('--content_license_url', type=str,
|
||||||
default='https://creativecommons.org/licenses/by/4.0',
|
default='https://creativecommons.org/licenses/by/4.0',
|
||||||
help='Url of the license used for the instance content')
|
help='Url of the license used for the instance content')
|
||||||
parser.add_argument('--listsEnabled', type=str,
|
parser.add_argument('--lists_enabled', type=str,
|
||||||
default=None,
|
default=None,
|
||||||
help='Names of content warning lists enabled. ' +
|
help='Names of content warning lists enabled. ' +
|
||||||
'See the cwlists directory')
|
'See the cwlists directory')
|
||||||
|
@ -3150,12 +3150,12 @@ if userAgentsBlockedStr:
|
||||||
for agentBlockStr in agentBlocksList:
|
for agentBlockStr in agentBlocksList:
|
||||||
userAgentsBlocked.append(agentBlockStr.strip())
|
userAgentsBlocked.append(agentBlockStr.strip())
|
||||||
|
|
||||||
listsEnabled = ''
|
lists_enabled = ''
|
||||||
if args.listsEnabled:
|
if args.lists_enabled:
|
||||||
listsEnabled = args.listsEnabled
|
lists_enabled = args.lists_enabled
|
||||||
setConfigParam(base_dir, 'listsEnabled', listsEnabled)
|
setConfigParam(base_dir, 'lists_enabled', lists_enabled)
|
||||||
else:
|
else:
|
||||||
listsEnabled = getConfigParam(base_dir, 'listsEnabled')
|
lists_enabled = getConfigParam(base_dir, 'lists_enabled')
|
||||||
|
|
||||||
city = \
|
city = \
|
||||||
getConfigParam(base_dir, 'city')
|
getConfigParam(base_dir, 'city')
|
||||||
|
@ -3211,7 +3211,7 @@ if args.defaultCurrency:
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
runDaemon(content_license_url,
|
runDaemon(content_license_url,
|
||||||
listsEnabled,
|
lists_enabled,
|
||||||
args.default_reply_interval_hrs,
|
args.default_reply_interval_hrs,
|
||||||
args.lowBandwidth, args.maxLikeCount,
|
args.lowBandwidth, args.maxLikeCount,
|
||||||
shared_items_federated_domains,
|
shared_items_federated_domains,
|
||||||
|
|
60
inbox.py
60
inbox.py
|
@ -292,7 +292,7 @@ def _inboxStorePostToHtmlCache(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
maxLikeCount: int,
|
maxLikeCount: int,
|
||||||
signingPrivateKeyPem: str,
|
signingPrivateKeyPem: str,
|
||||||
CWlists: {},
|
CWlists: {},
|
||||||
listsEnabled: str) -> None:
|
lists_enabled: str) -> 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
|
||||||
"""
|
"""
|
||||||
|
@ -317,7 +317,7 @@ def _inboxStorePostToHtmlCache(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
peertubeInstances, allowLocalNetworkAccess,
|
peertubeInstances, allowLocalNetworkAccess,
|
||||||
themeName, systemLanguage, maxLikeCount,
|
themeName, systemLanguage, maxLikeCount,
|
||||||
notDM, True, True, False, True, False,
|
notDM, True, True, False, True, False,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
|
|
||||||
|
|
||||||
def validInbox(base_dir: str, nickname: str, domain: str) -> bool:
|
def validInbox(base_dir: str, nickname: str, domain: str) -> bool:
|
||||||
|
@ -1005,7 +1005,7 @@ def _receiveLike(recentPostsCache: {},
|
||||||
allowLocalNetworkAccess: bool,
|
allowLocalNetworkAccess: bool,
|
||||||
themeName: str, systemLanguage: str,
|
themeName: str, systemLanguage: str,
|
||||||
maxLikeCount: int, CWlists: {},
|
maxLikeCount: int, CWlists: {},
|
||||||
listsEnabled: str) -> bool:
|
lists_enabled: str) -> bool:
|
||||||
"""Receives a Like activity within the POST section of HTTPServer
|
"""Receives a Like activity within the POST section of HTTPServer
|
||||||
"""
|
"""
|
||||||
if messageJson['type'] != 'Like':
|
if messageJson['type'] != 'Like':
|
||||||
|
@ -1108,7 +1108,7 @@ def _receiveLike(recentPostsCache: {},
|
||||||
showIndividualPostIcons,
|
showIndividualPostIcons,
|
||||||
manuallyApproveFollowers,
|
manuallyApproveFollowers,
|
||||||
False, True, False, CWlists,
|
False, True, False, CWlists,
|
||||||
listsEnabled)
|
lists_enabled)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
@ -1127,7 +1127,7 @@ def _receiveUndoLike(recentPostsCache: {},
|
||||||
allowLocalNetworkAccess: bool,
|
allowLocalNetworkAccess: bool,
|
||||||
themeName: str, systemLanguage: str,
|
themeName: str, systemLanguage: str,
|
||||||
maxLikeCount: int, CWlists: {},
|
maxLikeCount: int, CWlists: {},
|
||||||
listsEnabled: str) -> bool:
|
lists_enabled: str) -> bool:
|
||||||
"""Receives an undo like activity within the POST section of HTTPServer
|
"""Receives an undo like activity within the POST section of HTTPServer
|
||||||
"""
|
"""
|
||||||
if messageJson['type'] != 'Undo':
|
if messageJson['type'] != 'Undo':
|
||||||
|
@ -1219,7 +1219,7 @@ def _receiveUndoLike(recentPostsCache: {},
|
||||||
showIndividualPostIcons,
|
showIndividualPostIcons,
|
||||||
manuallyApproveFollowers,
|
manuallyApproveFollowers,
|
||||||
False, True, False, CWlists,
|
False, True, False, CWlists,
|
||||||
listsEnabled)
|
lists_enabled)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
@ -1239,7 +1239,7 @@ def _receiveReaction(recentPostsCache: {},
|
||||||
allowLocalNetworkAccess: bool,
|
allowLocalNetworkAccess: bool,
|
||||||
themeName: str, systemLanguage: str,
|
themeName: str, systemLanguage: str,
|
||||||
maxLikeCount: int, CWlists: {},
|
maxLikeCount: int, CWlists: {},
|
||||||
listsEnabled: str) -> bool:
|
lists_enabled: str) -> bool:
|
||||||
"""Receives an emoji reaction within the POST section of HTTPServer
|
"""Receives an emoji reaction within the POST section of HTTPServer
|
||||||
"""
|
"""
|
||||||
if messageJson['type'] != 'EmojiReact':
|
if messageJson['type'] != 'EmojiReact':
|
||||||
|
@ -1367,7 +1367,7 @@ def _receiveReaction(recentPostsCache: {},
|
||||||
showIndividualPostIcons,
|
showIndividualPostIcons,
|
||||||
manuallyApproveFollowers,
|
manuallyApproveFollowers,
|
||||||
False, True, False, CWlists,
|
False, True, False, CWlists,
|
||||||
listsEnabled)
|
lists_enabled)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
@ -1386,7 +1386,7 @@ def _receiveUndoReaction(recentPostsCache: {},
|
||||||
allowLocalNetworkAccess: bool,
|
allowLocalNetworkAccess: bool,
|
||||||
themeName: str, systemLanguage: str,
|
themeName: str, systemLanguage: str,
|
||||||
maxLikeCount: int, CWlists: {},
|
maxLikeCount: int, CWlists: {},
|
||||||
listsEnabled: str) -> bool:
|
lists_enabled: str) -> bool:
|
||||||
"""Receives an undo emoji reaction within the POST section of HTTPServer
|
"""Receives an undo emoji reaction within the POST section of HTTPServer
|
||||||
"""
|
"""
|
||||||
if messageJson['type'] != 'Undo':
|
if messageJson['type'] != 'Undo':
|
||||||
|
@ -1494,7 +1494,7 @@ def _receiveUndoReaction(recentPostsCache: {},
|
||||||
showIndividualPostIcons,
|
showIndividualPostIcons,
|
||||||
manuallyApproveFollowers,
|
manuallyApproveFollowers,
|
||||||
False, True, False, CWlists,
|
False, True, False, CWlists,
|
||||||
listsEnabled)
|
lists_enabled)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
@ -1512,7 +1512,7 @@ def _receiveBookmark(recentPostsCache: {},
|
||||||
allowLocalNetworkAccess: bool,
|
allowLocalNetworkAccess: bool,
|
||||||
themeName: str, systemLanguage: str,
|
themeName: str, systemLanguage: str,
|
||||||
maxLikeCount: int, CWlists: {},
|
maxLikeCount: int, CWlists: {},
|
||||||
listsEnabled: {}) -> bool:
|
lists_enabled: {}) -> bool:
|
||||||
"""Receives a bookmark activity within the POST section of HTTPServer
|
"""Receives a bookmark activity within the POST section of HTTPServer
|
||||||
"""
|
"""
|
||||||
if not messageJson.get('type'):
|
if not messageJson.get('type'):
|
||||||
|
@ -1604,7 +1604,7 @@ def _receiveBookmark(recentPostsCache: {},
|
||||||
showIndividualPostIcons,
|
showIndividualPostIcons,
|
||||||
manuallyApproveFollowers,
|
manuallyApproveFollowers,
|
||||||
False, True, False, CWlists,
|
False, True, False, CWlists,
|
||||||
listsEnabled)
|
lists_enabled)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
@ -1622,7 +1622,7 @@ def _receiveUndoBookmark(recentPostsCache: {},
|
||||||
allowLocalNetworkAccess: bool,
|
allowLocalNetworkAccess: bool,
|
||||||
themeName: str, systemLanguage: str,
|
themeName: str, systemLanguage: str,
|
||||||
maxLikeCount: int, CWlists: {},
|
maxLikeCount: int, CWlists: {},
|
||||||
listsEnabled: str) -> bool:
|
lists_enabled: str) -> bool:
|
||||||
"""Receives an undo bookmark activity within the POST section of HTTPServer
|
"""Receives an undo bookmark activity within the POST section of HTTPServer
|
||||||
"""
|
"""
|
||||||
if not messageJson.get('type'):
|
if not messageJson.get('type'):
|
||||||
|
@ -1714,7 +1714,7 @@ def _receiveUndoBookmark(recentPostsCache: {},
|
||||||
maxLikeCount, notDM,
|
maxLikeCount, notDM,
|
||||||
showIndividualPostIcons,
|
showIndividualPostIcons,
|
||||||
manuallyApproveFollowers,
|
manuallyApproveFollowers,
|
||||||
False, True, False, CWlists, listsEnabled)
|
False, True, False, CWlists, lists_enabled)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
@ -1809,7 +1809,7 @@ def _receiveAnnounce(recentPostsCache: {},
|
||||||
allowDeletion: bool,
|
allowDeletion: bool,
|
||||||
peertubeInstances: [],
|
peertubeInstances: [],
|
||||||
maxLikeCount: int, CWlists: {},
|
maxLikeCount: int, CWlists: {},
|
||||||
listsEnabled: str) -> bool:
|
lists_enabled: str) -> bool:
|
||||||
"""Receives an announce activity within the POST section of HTTPServer
|
"""Receives an announce activity within the POST section of HTTPServer
|
||||||
"""
|
"""
|
||||||
if messageJson['type'] != 'Announce':
|
if messageJson['type'] != 'Announce':
|
||||||
|
@ -1922,7 +1922,7 @@ def _receiveAnnounce(recentPostsCache: {},
|
||||||
showIndividualPostIcons,
|
showIndividualPostIcons,
|
||||||
manuallyApproveFollowers,
|
manuallyApproveFollowers,
|
||||||
False, True, False, CWlists,
|
False, True, False, CWlists,
|
||||||
listsEnabled)
|
lists_enabled)
|
||||||
if not announceHtml:
|
if not announceHtml:
|
||||||
print('WARN: Unable to generate html for announce ' +
|
print('WARN: Unable to generate html for announce ' +
|
||||||
str(messageJson))
|
str(messageJson))
|
||||||
|
@ -2986,7 +2986,7 @@ def _receiveQuestionVote(base_dir: str, nickname: str, domain: str,
|
||||||
allowLocalNetworkAccess: bool,
|
allowLocalNetworkAccess: bool,
|
||||||
themeName: str, systemLanguage: str,
|
themeName: str, systemLanguage: str,
|
||||||
maxLikeCount: int,
|
maxLikeCount: int,
|
||||||
CWlists: {}, listsEnabled: bool) -> None:
|
CWlists: {}, lists_enabled: bool) -> None:
|
||||||
"""Updates the votes on a Question/poll
|
"""Updates the votes on a Question/poll
|
||||||
"""
|
"""
|
||||||
# if this is a reply to a question then update the votes
|
# if this is a reply to a question then update the votes
|
||||||
|
@ -3034,7 +3034,7 @@ def _receiveQuestionVote(base_dir: str, nickname: str, domain: str,
|
||||||
showIndividualPostIcons,
|
showIndividualPostIcons,
|
||||||
manuallyApproveFollowers,
|
manuallyApproveFollowers,
|
||||||
False, True, False, CWlists,
|
False, True, False, CWlists,
|
||||||
listsEnabled)
|
lists_enabled)
|
||||||
|
|
||||||
# add id to inbox index
|
# add id to inbox index
|
||||||
inboxUpdateIndex('inbox', base_dir, handle,
|
inboxUpdateIndex('inbox', base_dir, handle,
|
||||||
|
@ -3197,7 +3197,7 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
maxLikeCount: int,
|
maxLikeCount: int,
|
||||||
signingPrivateKeyPem: str,
|
signingPrivateKeyPem: str,
|
||||||
default_reply_interval_hrs: int,
|
default_reply_interval_hrs: int,
|
||||||
CWlists: {}, listsEnabled: str,
|
CWlists: {}, lists_enabled: str,
|
||||||
content_license_url: str) -> bool:
|
content_license_url: str) -> bool:
|
||||||
""" Anything which needs to be done after initial checks have passed
|
""" Anything which needs to be done after initial checks have passed
|
||||||
"""
|
"""
|
||||||
|
@ -3228,7 +3228,7 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
peertubeInstances,
|
peertubeInstances,
|
||||||
allowLocalNetworkAccess,
|
allowLocalNetworkAccess,
|
||||||
themeName, systemLanguage,
|
themeName, systemLanguage,
|
||||||
maxLikeCount, CWlists, listsEnabled):
|
maxLikeCount, CWlists, lists_enabled):
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: Like accepted from ' + actor)
|
print('DEBUG: Like accepted from ' + actor)
|
||||||
return False
|
return False
|
||||||
|
@ -3250,7 +3250,7 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
peertubeInstances,
|
peertubeInstances,
|
||||||
allowLocalNetworkAccess,
|
allowLocalNetworkAccess,
|
||||||
themeName, systemLanguage,
|
themeName, systemLanguage,
|
||||||
maxLikeCount, CWlists, listsEnabled):
|
maxLikeCount, CWlists, lists_enabled):
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: Undo like accepted from ' + actor)
|
print('DEBUG: Undo like accepted from ' + actor)
|
||||||
return False
|
return False
|
||||||
|
@ -3273,7 +3273,7 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
peertubeInstances,
|
peertubeInstances,
|
||||||
allowLocalNetworkAccess,
|
allowLocalNetworkAccess,
|
||||||
themeName, systemLanguage,
|
themeName, systemLanguage,
|
||||||
maxLikeCount, CWlists, listsEnabled):
|
maxLikeCount, CWlists, lists_enabled):
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: Reaction accepted from ' + actor)
|
print('DEBUG: Reaction accepted from ' + actor)
|
||||||
return False
|
return False
|
||||||
|
@ -3295,7 +3295,7 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
peertubeInstances,
|
peertubeInstances,
|
||||||
allowLocalNetworkAccess,
|
allowLocalNetworkAccess,
|
||||||
themeName, systemLanguage,
|
themeName, systemLanguage,
|
||||||
maxLikeCount, CWlists, listsEnabled):
|
maxLikeCount, CWlists, lists_enabled):
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: Undo reaction accepted from ' + actor)
|
print('DEBUG: Undo reaction accepted from ' + actor)
|
||||||
return False
|
return False
|
||||||
|
@ -3317,7 +3317,7 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
peertubeInstances,
|
peertubeInstances,
|
||||||
allowLocalNetworkAccess,
|
allowLocalNetworkAccess,
|
||||||
themeName, systemLanguage,
|
themeName, systemLanguage,
|
||||||
maxLikeCount, CWlists, listsEnabled):
|
maxLikeCount, CWlists, lists_enabled):
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: Bookmark accepted from ' + actor)
|
print('DEBUG: Bookmark accepted from ' + actor)
|
||||||
return False
|
return False
|
||||||
|
@ -3339,7 +3339,7 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
peertubeInstances,
|
peertubeInstances,
|
||||||
allowLocalNetworkAccess,
|
allowLocalNetworkAccess,
|
||||||
themeName, systemLanguage,
|
themeName, systemLanguage,
|
||||||
maxLikeCount, CWlists, listsEnabled):
|
maxLikeCount, CWlists, lists_enabled):
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: Undo bookmark accepted from ' + actor)
|
print('DEBUG: Undo bookmark accepted from ' + actor)
|
||||||
return False
|
return False
|
||||||
|
@ -3365,7 +3365,7 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
maxRecentPosts,
|
maxRecentPosts,
|
||||||
allowDeletion,
|
allowDeletion,
|
||||||
peertubeInstances,
|
peertubeInstances,
|
||||||
maxLikeCount, CWlists, listsEnabled):
|
maxLikeCount, CWlists, lists_enabled):
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: Announce accepted from ' + actor)
|
print('DEBUG: Announce accepted from ' + actor)
|
||||||
|
|
||||||
|
@ -3462,7 +3462,7 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
allowLocalNetworkAccess,
|
allowLocalNetworkAccess,
|
||||||
themeName, systemLanguage,
|
themeName, systemLanguage,
|
||||||
maxLikeCount,
|
maxLikeCount,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
|
|
||||||
isReplyToMutedPost = False
|
isReplyToMutedPost = False
|
||||||
|
|
||||||
|
@ -3568,7 +3568,7 @@ def _inboxAfterInitial(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
themeName, systemLanguage,
|
themeName, systemLanguage,
|
||||||
maxLikeCount,
|
maxLikeCount,
|
||||||
signingPrivateKeyPem,
|
signingPrivateKeyPem,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
if debug:
|
if debug:
|
||||||
timeDiff = \
|
timeDiff = \
|
||||||
str(int((time.time() - htmlCacheStartTime) *
|
str(int((time.time() - htmlCacheStartTime) *
|
||||||
|
@ -4478,7 +4478,7 @@ def runInboxQueue(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
if not os.path.isfile(sharedInboxPostFilename):
|
if not os.path.isfile(sharedInboxPostFilename):
|
||||||
saveJson(queueJson['post'], sharedInboxPostFilename)
|
saveJson(queueJson['post'], sharedInboxPostFilename)
|
||||||
|
|
||||||
listsEnabled = getConfigParam(base_dir, "listsEnabled")
|
lists_enabled = getConfigParam(base_dir, "lists_enabled")
|
||||||
content_license_url = getConfigParam(base_dir, "content_license_url")
|
content_license_url = getConfigParam(base_dir, "content_license_url")
|
||||||
|
|
||||||
# for posts addressed to specific accounts
|
# for posts addressed to specific accounts
|
||||||
|
@ -4512,7 +4512,7 @@ def runInboxQueue(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
maxLikeCount,
|
maxLikeCount,
|
||||||
signingPrivateKeyPem,
|
signingPrivateKeyPem,
|
||||||
default_reply_interval_hrs,
|
default_reply_interval_hrs,
|
||||||
CWlists, listsEnabled,
|
CWlists, lists_enabled,
|
||||||
content_license_url)
|
content_license_url)
|
||||||
if debug:
|
if debug:
|
||||||
pprint(queueJson['post'])
|
pprint(queueJson['post'])
|
||||||
|
|
|
@ -199,7 +199,7 @@ def postMessageToOutbox(session, translate: {},
|
||||||
peertubeInstances: str, theme: str,
|
peertubeInstances: str, theme: str,
|
||||||
maxLikeCount: int,
|
maxLikeCount: int,
|
||||||
maxRecentPosts: int, CWlists: {},
|
maxRecentPosts: int, CWlists: {},
|
||||||
listsEnabled: str,
|
lists_enabled: str,
|
||||||
content_license_url: str) -> bool:
|
content_license_url: str) -> bool:
|
||||||
"""post is received by the outbox
|
"""post is received by the outbox
|
||||||
Client to server message post
|
Client to server message post
|
||||||
|
@ -475,7 +475,7 @@ def postMessageToOutbox(session, translate: {},
|
||||||
showIndividualPostIcons,
|
showIndividualPostIcons,
|
||||||
manuallyApproveFollowers,
|
manuallyApproveFollowers,
|
||||||
False, True, useCacheOnly,
|
False, True, useCacheOnly,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
|
|
||||||
if outboxAnnounce(recentPostsCache,
|
if outboxAnnounce(recentPostsCache,
|
||||||
base_dir, messageJson, debug):
|
base_dir, messageJson, debug):
|
||||||
|
|
|
@ -128,7 +128,7 @@ def _updatePostSchedule(base_dir: str, handle: str, httpd,
|
||||||
httpd.maxLikeCount,
|
httpd.maxLikeCount,
|
||||||
httpd.maxRecentPosts,
|
httpd.maxRecentPosts,
|
||||||
httpd.CWlists,
|
httpd.CWlists,
|
||||||
httpd.listsEnabled,
|
httpd.lists_enabled,
|
||||||
httpd.content_license_url):
|
httpd.content_license_url):
|
||||||
indexLines.remove(line)
|
indexLines.remove(line)
|
||||||
try:
|
try:
|
||||||
|
|
16
tests.py
16
tests.py
|
@ -793,11 +793,11 @@ def createServerAlice(path: str, domain: str, port: int,
|
||||||
userAgentsBlocked = []
|
userAgentsBlocked = []
|
||||||
maxLikeCount = 10
|
maxLikeCount = 10
|
||||||
default_reply_interval_hrs = 9999999999
|
default_reply_interval_hrs = 9999999999
|
||||||
listsEnabled = ''
|
lists_enabled = ''
|
||||||
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
|
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
|
||||||
print('Server running: Alice')
|
print('Server running: Alice')
|
||||||
runDaemon(content_license_url,
|
runDaemon(content_license_url,
|
||||||
listsEnabled, default_reply_interval_hrs,
|
lists_enabled, default_reply_interval_hrs,
|
||||||
lowBandwidth, maxLikeCount,
|
lowBandwidth, maxLikeCount,
|
||||||
shared_items_federated_domains,
|
shared_items_federated_domains,
|
||||||
userAgentsBlocked,
|
userAgentsBlocked,
|
||||||
|
@ -935,11 +935,11 @@ def createServerBob(path: str, domain: str, port: int,
|
||||||
userAgentsBlocked = []
|
userAgentsBlocked = []
|
||||||
maxLikeCount = 10
|
maxLikeCount = 10
|
||||||
default_reply_interval_hrs = 9999999999
|
default_reply_interval_hrs = 9999999999
|
||||||
listsEnabled = ''
|
lists_enabled = ''
|
||||||
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
|
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
|
||||||
print('Server running: Bob')
|
print('Server running: Bob')
|
||||||
runDaemon(content_license_url,
|
runDaemon(content_license_url,
|
||||||
listsEnabled, default_reply_interval_hrs,
|
lists_enabled, default_reply_interval_hrs,
|
||||||
lowBandwidth, maxLikeCount,
|
lowBandwidth, maxLikeCount,
|
||||||
shared_items_federated_domains,
|
shared_items_federated_domains,
|
||||||
userAgentsBlocked,
|
userAgentsBlocked,
|
||||||
|
@ -1005,11 +1005,11 @@ def createServerEve(path: str, domain: str, port: int, federationList: [],
|
||||||
maxLikeCount = 10
|
maxLikeCount = 10
|
||||||
lowBandwidth = True
|
lowBandwidth = True
|
||||||
default_reply_interval_hrs = 9999999999
|
default_reply_interval_hrs = 9999999999
|
||||||
listsEnabled = ''
|
lists_enabled = ''
|
||||||
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
|
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
|
||||||
print('Server running: Eve')
|
print('Server running: Eve')
|
||||||
runDaemon(content_license_url,
|
runDaemon(content_license_url,
|
||||||
listsEnabled, default_reply_interval_hrs,
|
lists_enabled, default_reply_interval_hrs,
|
||||||
lowBandwidth, maxLikeCount,
|
lowBandwidth, maxLikeCount,
|
||||||
shared_items_federated_domains,
|
shared_items_federated_domains,
|
||||||
userAgentsBlocked,
|
userAgentsBlocked,
|
||||||
|
@ -1077,11 +1077,11 @@ def createServerGroup(path: str, domain: str, port: int,
|
||||||
maxLikeCount = 10
|
maxLikeCount = 10
|
||||||
lowBandwidth = True
|
lowBandwidth = True
|
||||||
default_reply_interval_hrs = 9999999999
|
default_reply_interval_hrs = 9999999999
|
||||||
listsEnabled = ''
|
lists_enabled = ''
|
||||||
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
|
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
|
||||||
print('Server running: Group')
|
print('Server running: Group')
|
||||||
runDaemon(content_license_url,
|
runDaemon(content_license_url,
|
||||||
listsEnabled, default_reply_interval_hrs,
|
lists_enabled, default_reply_interval_hrs,
|
||||||
lowBandwidth, maxLikeCount,
|
lowBandwidth, maxLikeCount,
|
||||||
shared_items_federated_domains,
|
shared_items_federated_domains,
|
||||||
userAgentsBlocked,
|
userAgentsBlocked,
|
||||||
|
|
|
@ -37,7 +37,7 @@ def htmlConfirmDelete(cssCache: {},
|
||||||
allowLocalNetworkAccess: bool,
|
allowLocalNetworkAccess: bool,
|
||||||
themeName: str, systemLanguage: str,
|
themeName: str, systemLanguage: str,
|
||||||
maxLikeCount: int, signingPrivateKeyPem: str,
|
maxLikeCount: int, signingPrivateKeyPem: str,
|
||||||
CWlists: {}, listsEnabled: str) -> str:
|
CWlists: {}, lists_enabled: str) -> 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:
|
||||||
|
@ -78,7 +78,7 @@ def htmlConfirmDelete(cssCache: {},
|
||||||
peertubeInstances, allowLocalNetworkAccess,
|
peertubeInstances, allowLocalNetworkAccess,
|
||||||
themeName, systemLanguage, maxLikeCount,
|
themeName, systemLanguage, maxLikeCount,
|
||||||
False, False, False, False, False, False,
|
False, False, False, False, False, False,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
deletePostStr += '<center>'
|
deletePostStr += '<center>'
|
||||||
deletePostStr += \
|
deletePostStr += \
|
||||||
' <p class="followText">' + \
|
' <p class="followText">' + \
|
||||||
|
|
|
@ -209,7 +209,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
|
||||||
allowLocalNetworkAccess: bool,
|
allowLocalNetworkAccess: bool,
|
||||||
systemLanguage: str,
|
systemLanguage: str,
|
||||||
maxLikeCount: int, signingPrivateKeyPem: str,
|
maxLikeCount: int, signingPrivateKeyPem: str,
|
||||||
CWlists: {}, listsEnabled: str,
|
CWlists: {}, lists_enabled: str,
|
||||||
boxName: str) -> str:
|
boxName: str) -> str:
|
||||||
"""New post screen
|
"""New post screen
|
||||||
"""
|
"""
|
||||||
|
@ -280,7 +280,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
|
||||||
maxLikeCount,
|
maxLikeCount,
|
||||||
False, False, False,
|
False, False, False,
|
||||||
False, False, False,
|
False, False, False,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
|
|
||||||
replyStr = '<input type="hidden" ' + \
|
replyStr = '<input type="hidden" ' + \
|
||||||
'name="replyTo" value="' + inReplyTo + '">\n'
|
'name="replyTo" value="' + inReplyTo + '">\n'
|
||||||
|
|
|
@ -36,7 +36,7 @@ def _htmlFrontScreenPosts(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
themeName: str, systemLanguage: str,
|
themeName: str, systemLanguage: str,
|
||||||
maxLikeCount: int,
|
maxLikeCount: int,
|
||||||
signingPrivateKeyPem: str, CWlists: {},
|
signingPrivateKeyPem: str, CWlists: {},
|
||||||
listsEnabled: str) -> str:
|
lists_enabled: str) -> 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
|
||||||
|
@ -83,7 +83,7 @@ def _htmlFrontScreenPosts(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
maxLikeCount,
|
maxLikeCount,
|
||||||
False, False, False,
|
False, False, False,
|
||||||
True, False, False,
|
True, False, False,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
if postStr:
|
if postStr:
|
||||||
profileStr += postStr + separatorStr
|
profileStr += postStr + separatorStr
|
||||||
ctr += 1
|
ctr += 1
|
||||||
|
@ -114,7 +114,7 @@ def htmlFrontScreen(signingPrivateKeyPem: str,
|
||||||
extraJson: {},
|
extraJson: {},
|
||||||
pageNumber: int,
|
pageNumber: int,
|
||||||
maxItemsPerPage: int,
|
maxItemsPerPage: int,
|
||||||
CWlists: {}, listsEnabled: str) -> str:
|
CWlists: {}, lists_enabled: str) -> str:
|
||||||
"""Show the news instance front screen
|
"""Show the news instance front screen
|
||||||
"""
|
"""
|
||||||
nickname = profileJson['preferredUsername']
|
nickname = profileJson['preferredUsername']
|
||||||
|
@ -187,7 +187,7 @@ def htmlFrontScreen(signingPrivateKeyPem: str,
|
||||||
theme, systemLanguage,
|
theme, systemLanguage,
|
||||||
maxLikeCount,
|
maxLikeCount,
|
||||||
signingPrivateKeyPem,
|
signingPrivateKeyPem,
|
||||||
CWlists, listsEnabled) + licenseStr
|
CWlists, lists_enabled) + licenseStr
|
||||||
|
|
||||||
# Footer which is only used for system accounts
|
# Footer which is only used for system accounts
|
||||||
profileFooterStr = ' </td>\n'
|
profileFooterStr = ' </td>\n'
|
||||||
|
|
|
@ -54,7 +54,7 @@ def htmlModeration(cssCache: {}, defaultTimeline: str,
|
||||||
maxLikeCount: int,
|
maxLikeCount: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
signingPrivateKeyPem: str,
|
signingPrivateKeyPem: str,
|
||||||
CWlists: {}, listsEnabled: str) -> str:
|
CWlists: {}, lists_enabled: str) -> 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
|
||||||
"""
|
"""
|
||||||
|
@ -77,7 +77,7 @@ def htmlModeration(cssCache: {}, defaultTimeline: str,
|
||||||
peertubeInstances, allowLocalNetworkAccess,
|
peertubeInstances, allowLocalNetworkAccess,
|
||||||
textModeBanner, accessKeys, systemLanguage,
|
textModeBanner, accessKeys, systemLanguage,
|
||||||
maxLikeCount, shared_items_federated_domains,
|
maxLikeCount, shared_items_federated_domains,
|
||||||
signingPrivateKeyPem, CWlists, listsEnabled)
|
signingPrivateKeyPem, CWlists, lists_enabled)
|
||||||
|
|
||||||
|
|
||||||
def htmlAccountInfo(cssCache: {}, translate: {},
|
def htmlAccountInfo(cssCache: {}, translate: {},
|
||||||
|
|
|
@ -1345,7 +1345,7 @@ def individualPostAsHtml(signingPrivateKeyPem: str,
|
||||||
storeToCache: bool,
|
storeToCache: bool,
|
||||||
useCacheOnly: bool,
|
useCacheOnly: bool,
|
||||||
CWlists: {},
|
CWlists: {},
|
||||||
listsEnabled: str) -> str:
|
lists_enabled: str) -> str:
|
||||||
""" Shows a single post as html
|
""" Shows a single post as html
|
||||||
"""
|
"""
|
||||||
if not postJsonObject:
|
if not postJsonObject:
|
||||||
|
@ -1820,7 +1820,7 @@ def individualPostAsHtml(signingPrivateKeyPem: str,
|
||||||
footerStr = newFooterStr
|
footerStr = newFooterStr
|
||||||
|
|
||||||
# add any content warning from the cwlists directory
|
# add any content warning from the cwlists directory
|
||||||
addCWfromLists(postJsonObject, CWlists, translate, listsEnabled)
|
addCWfromLists(postJsonObject, CWlists, translate, lists_enabled)
|
||||||
|
|
||||||
postIsSensitive = False
|
postIsSensitive = False
|
||||||
if postJsonObject['object'].get('sensitive'):
|
if postJsonObject['object'].get('sensitive'):
|
||||||
|
@ -2006,7 +2006,7 @@ def htmlIndividualPost(cssCache: {},
|
||||||
allowLocalNetworkAccess: bool,
|
allowLocalNetworkAccess: bool,
|
||||||
themeName: str, systemLanguage: str,
|
themeName: str, systemLanguage: str,
|
||||||
maxLikeCount: int, signingPrivateKeyPem: str,
|
maxLikeCount: int, signingPrivateKeyPem: str,
|
||||||
CWlists: {}, listsEnabled: str) -> str:
|
CWlists: {}, lists_enabled: str) -> str:
|
||||||
"""Show an individual post as html
|
"""Show an individual post as html
|
||||||
"""
|
"""
|
||||||
originalPostJson = postJsonObject
|
originalPostJson = postJsonObject
|
||||||
|
@ -2071,7 +2071,7 @@ def htmlIndividualPost(cssCache: {},
|
||||||
allowLocalNetworkAccess, themeName,
|
allowLocalNetworkAccess, themeName,
|
||||||
systemLanguage, maxLikeCount,
|
systemLanguage, maxLikeCount,
|
||||||
False, authorized, False, False, False, False,
|
False, authorized, False, False, False, False,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
messageId = removeIdEnding(postJsonObject['id'])
|
messageId = removeIdEnding(postJsonObject['id'])
|
||||||
|
|
||||||
# show the previous posts
|
# show the previous posts
|
||||||
|
@ -2104,7 +2104,7 @@ def htmlIndividualPost(cssCache: {},
|
||||||
maxLikeCount,
|
maxLikeCount,
|
||||||
False, authorized,
|
False, authorized,
|
||||||
False, False, False, False,
|
False, False, False, False,
|
||||||
CWlists, listsEnabled) + postStr
|
CWlists, lists_enabled) + postStr
|
||||||
|
|
||||||
# show the following posts
|
# show the following posts
|
||||||
postFilename = locatePost(base_dir, nickname, domain, messageId)
|
postFilename = locatePost(base_dir, nickname, domain, messageId)
|
||||||
|
@ -2139,7 +2139,7 @@ def htmlIndividualPost(cssCache: {},
|
||||||
maxLikeCount,
|
maxLikeCount,
|
||||||
False, authorized,
|
False, authorized,
|
||||||
False, False, False, False,
|
False, False, False, False,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
cssFilename = base_dir + '/epicyon-profile.css'
|
cssFilename = base_dir + '/epicyon-profile.css'
|
||||||
if os.path.isfile(base_dir + '/epicyon.css'):
|
if os.path.isfile(base_dir + '/epicyon.css'):
|
||||||
cssFilename = base_dir + '/epicyon.css'
|
cssFilename = base_dir + '/epicyon.css'
|
||||||
|
@ -2166,7 +2166,7 @@ def htmlPostReplies(cssCache: {},
|
||||||
themeName: str, systemLanguage: str,
|
themeName: str, systemLanguage: str,
|
||||||
maxLikeCount: int,
|
maxLikeCount: int,
|
||||||
signingPrivateKeyPem: str, CWlists: {},
|
signingPrivateKeyPem: str, CWlists: {},
|
||||||
listsEnabled: str) -> str:
|
lists_enabled: str) -> str:
|
||||||
"""Show the replies to an individual post as html
|
"""Show the replies to an individual post as html
|
||||||
"""
|
"""
|
||||||
repliesStr = ''
|
repliesStr = ''
|
||||||
|
@ -2190,7 +2190,7 @@ def htmlPostReplies(cssCache: {},
|
||||||
themeName, systemLanguage,
|
themeName, systemLanguage,
|
||||||
maxLikeCount,
|
maxLikeCount,
|
||||||
False, False, False, False, False, False,
|
False, False, False, False, False, False,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
|
|
||||||
cssFilename = base_dir + '/epicyon-profile.css'
|
cssFilename = base_dir + '/epicyon-profile.css'
|
||||||
if os.path.isfile(base_dir + '/epicyon.css'):
|
if os.path.isfile(base_dir + '/epicyon.css'):
|
||||||
|
@ -2218,7 +2218,7 @@ def htmlEmojiReactionPicker(cssCache: {},
|
||||||
allowLocalNetworkAccess: bool,
|
allowLocalNetworkAccess: bool,
|
||||||
themeName: str, systemLanguage: str,
|
themeName: str, systemLanguage: str,
|
||||||
maxLikeCount: int, signingPrivateKeyPem: str,
|
maxLikeCount: int, signingPrivateKeyPem: str,
|
||||||
CWlists: {}, listsEnabled: str,
|
CWlists: {}, lists_enabled: str,
|
||||||
boxName: str, pageNumber: int) -> str:
|
boxName: str, pageNumber: int) -> str:
|
||||||
"""Returns the emoji picker screen
|
"""Returns the emoji picker screen
|
||||||
"""
|
"""
|
||||||
|
@ -2242,7 +2242,7 @@ def htmlEmojiReactionPicker(cssCache: {},
|
||||||
themeName, systemLanguage,
|
themeName, systemLanguage,
|
||||||
maxLikeCount,
|
maxLikeCount,
|
||||||
False, False, False, False, False, False,
|
False, False, False, False, False, False,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
|
|
||||||
reactionsFilename = base_dir + '/emoji/reactions.json'
|
reactionsFilename = base_dir + '/emoji/reactions.json'
|
||||||
if not os.path.isfile(reactionsFilename):
|
if not os.path.isfile(reactionsFilename):
|
||||||
|
|
|
@ -140,7 +140,7 @@ def htmlProfileAfterSearch(cssCache: {},
|
||||||
systemLanguage: str,
|
systemLanguage: str,
|
||||||
maxLikeCount: int,
|
maxLikeCount: int,
|
||||||
signingPrivateKeyPem: str,
|
signingPrivateKeyPem: str,
|
||||||
CWlists: {}, listsEnabled: str) -> str:
|
CWlists: {}, lists_enabled: str) -> str:
|
||||||
"""Show a profile page after a search for a fediverse address
|
"""Show a profile page after a search for a fediverse address
|
||||||
"""
|
"""
|
||||||
http = False
|
http = False
|
||||||
|
@ -347,7 +347,7 @@ def htmlProfileAfterSearch(cssCache: {},
|
||||||
allowLocalNetworkAccess,
|
allowLocalNetworkAccess,
|
||||||
themeName, systemLanguage, maxLikeCount,
|
themeName, systemLanguage, maxLikeCount,
|
||||||
False, False, False, False, False, False,
|
False, False, False, False, False, False,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
i += 1
|
i += 1
|
||||||
if i >= 8:
|
if i >= 8:
|
||||||
break
|
break
|
||||||
|
@ -559,7 +559,7 @@ def htmlProfile(signingPrivateKeyPem: str,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
extraJson: {}, pageNumber: int,
|
extraJson: {}, pageNumber: int,
|
||||||
maxItemsPerPage: int,
|
maxItemsPerPage: int,
|
||||||
CWlists: {}, listsEnabled: str,
|
CWlists: {}, lists_enabled: str,
|
||||||
content_license_url: str) -> str:
|
content_license_url: str) -> str:
|
||||||
"""Show the profile page as html
|
"""Show the profile page as html
|
||||||
"""
|
"""
|
||||||
|
@ -584,7 +584,7 @@ def htmlProfile(signingPrivateKeyPem: str,
|
||||||
systemLanguage, maxLikeCount,
|
systemLanguage, maxLikeCount,
|
||||||
shared_items_federated_domains, None,
|
shared_items_federated_domains, None,
|
||||||
pageNumber, maxItemsPerPage, CWlists,
|
pageNumber, maxItemsPerPage, CWlists,
|
||||||
listsEnabled)
|
lists_enabled)
|
||||||
|
|
||||||
domain, port = getDomainFromActor(profileJson['id'])
|
domain, port = getDomainFromActor(profileJson['id'])
|
||||||
if not domain:
|
if not domain:
|
||||||
|
@ -966,7 +966,7 @@ def htmlProfile(signingPrivateKeyPem: str,
|
||||||
theme, systemLanguage,
|
theme, systemLanguage,
|
||||||
maxLikeCount,
|
maxLikeCount,
|
||||||
signingPrivateKeyPem,
|
signingPrivateKeyPem,
|
||||||
CWlists, listsEnabled) + licenseStr
|
CWlists, lists_enabled) + licenseStr
|
||||||
if not isGroup:
|
if not isGroup:
|
||||||
if selected == 'following':
|
if selected == 'following':
|
||||||
profileStr += \
|
profileStr += \
|
||||||
|
@ -1034,7 +1034,7 @@ def _htmlProfilePosts(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
themeName: str, systemLanguage: str,
|
themeName: str, systemLanguage: str,
|
||||||
maxLikeCount: int,
|
maxLikeCount: int,
|
||||||
signingPrivateKeyPem: str,
|
signingPrivateKeyPem: str,
|
||||||
CWlists: {}, listsEnabled: str) -> str:
|
CWlists: {}, lists_enabled: str) -> 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
|
||||||
"""
|
"""
|
||||||
|
@ -1080,7 +1080,7 @@ def _htmlProfilePosts(recentPostsCache: {}, maxRecentPosts: int,
|
||||||
maxLikeCount,
|
maxLikeCount,
|
||||||
False, False, False,
|
False, False, False,
|
||||||
True, False, False,
|
True, False, False,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
if postStr:
|
if postStr:
|
||||||
profileStr += postStr + separatorStr
|
profileStr += postStr + separatorStr
|
||||||
ctr += 1
|
ctr += 1
|
||||||
|
@ -1594,7 +1594,7 @@ def _htmlEditProfileSharedItems(base_dir: str, nickname: str, domain: str,
|
||||||
def _htmlEditProfileFiltering(base_dir: str, nickname: str, domain: str,
|
def _htmlEditProfileFiltering(base_dir: str, nickname: str, domain: str,
|
||||||
userAgentsBlocked: str,
|
userAgentsBlocked: str,
|
||||||
translate: {}, replyIntervalHours: int,
|
translate: {}, replyIntervalHours: int,
|
||||||
CWlists: {}, listsEnabled: str) -> str:
|
CWlists: {}, lists_enabled: str) -> str:
|
||||||
"""Filtering and blocking section of edit profile screen
|
"""Filtering and blocking section of edit profile screen
|
||||||
"""
|
"""
|
||||||
filterStr = ''
|
filterStr = ''
|
||||||
|
@ -1773,8 +1773,8 @@ def _htmlEditProfileFiltering(base_dir: str, nickname: str, domain: str,
|
||||||
for name, item in CWlists.items():
|
for name, item in CWlists.items():
|
||||||
variableName = getCWlistVariable(name)
|
variableName = getCWlistVariable(name)
|
||||||
listIsEnabled = False
|
listIsEnabled = False
|
||||||
if listsEnabled:
|
if lists_enabled:
|
||||||
if name in listsEnabled:
|
if name in lists_enabled:
|
||||||
listIsEnabled = True
|
listIsEnabled = True
|
||||||
if translate.get(name):
|
if translate.get(name):
|
||||||
name = translate[name]
|
name = translate[name]
|
||||||
|
@ -2091,7 +2091,7 @@ def htmlEditProfile(cssCache: {}, translate: {}, base_dir: str, path: str,
|
||||||
userAgentsBlocked: str,
|
userAgentsBlocked: str,
|
||||||
accessKeys: {},
|
accessKeys: {},
|
||||||
default_reply_interval_hrs: int,
|
default_reply_interval_hrs: int,
|
||||||
CWlists: {}, listsEnabled: str) -> str:
|
CWlists: {}, lists_enabled: str) -> str:
|
||||||
"""Shows the edit profile screen
|
"""Shows the edit profile screen
|
||||||
"""
|
"""
|
||||||
path = path.replace('/inbox', '').replace('/outbox', '')
|
path = path.replace('/inbox', '').replace('/outbox', '')
|
||||||
|
@ -2302,7 +2302,7 @@ def htmlEditProfile(cssCache: {}, translate: {}, base_dir: str, path: str,
|
||||||
_htmlEditProfileFiltering(base_dir, nickname, domain,
|
_htmlEditProfileFiltering(base_dir, nickname, domain,
|
||||||
userAgentsBlocked, translate,
|
userAgentsBlocked, translate,
|
||||||
replyIntervalHours,
|
replyIntervalHours,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
|
|
||||||
# git projects section
|
# git projects section
|
||||||
editProfileForm += \
|
editProfileForm += \
|
||||||
|
|
|
@ -607,7 +607,7 @@ def htmlHistorySearch(cssCache: {}, translate: {}, base_dir: str,
|
||||||
maxLikeCount: int,
|
maxLikeCount: int,
|
||||||
signingPrivateKeyPem: str,
|
signingPrivateKeyPem: str,
|
||||||
CWlists: {},
|
CWlists: {},
|
||||||
listsEnabled: str) -> str:
|
lists_enabled: str) -> 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("'"):
|
||||||
|
@ -693,7 +693,7 @@ def htmlHistorySearch(cssCache: {}, translate: {}, base_dir: str,
|
||||||
showIndividualPostIcons,
|
showIndividualPostIcons,
|
||||||
showIndividualPostIcons,
|
showIndividualPostIcons,
|
||||||
False, False, False, False,
|
False, False, False, False,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
if postStr:
|
if postStr:
|
||||||
historySearchForm += separatorStr + postStr
|
historySearchForm += separatorStr + postStr
|
||||||
index += 1
|
index += 1
|
||||||
|
@ -718,7 +718,7 @@ def htmlHashtagSearch(cssCache: {},
|
||||||
themeName: str, systemLanguage: str,
|
themeName: str, systemLanguage: str,
|
||||||
maxLikeCount: int,
|
maxLikeCount: int,
|
||||||
signingPrivateKeyPem: str,
|
signingPrivateKeyPem: str,
|
||||||
CWlists: {}, listsEnabled: str) -> str:
|
CWlists: {}, lists_enabled: str) -> str:
|
||||||
"""Show a page containing search results for a hashtag
|
"""Show a page containing search results for a hashtag
|
||||||
or after selecting a hashtag from the swarm
|
or after selecting a hashtag from the swarm
|
||||||
"""
|
"""
|
||||||
|
@ -877,7 +877,7 @@ def htmlHashtagSearch(cssCache: {},
|
||||||
manuallyApprovesFollowers,
|
manuallyApprovesFollowers,
|
||||||
showPublicOnly,
|
showPublicOnly,
|
||||||
storeToCache, False, CWlists,
|
storeToCache, False, CWlists,
|
||||||
listsEnabled)
|
lists_enabled)
|
||||||
if postStr:
|
if postStr:
|
||||||
hashtagSearchForm += separatorStr + postStr
|
hashtagSearchForm += separatorStr + postStr
|
||||||
index += 1
|
index += 1
|
||||||
|
|
|
@ -448,7 +448,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
maxLikeCount: int,
|
maxLikeCount: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
signingPrivateKeyPem: str,
|
signingPrivateKeyPem: str,
|
||||||
CWlists: {}, listsEnabled: str) -> str:
|
CWlists: {}, lists_enabled: str) -> str:
|
||||||
"""Show the timeline as html
|
"""Show the timeline as html
|
||||||
"""
|
"""
|
||||||
enableTimingLog = False
|
enableTimingLog = False
|
||||||
|
@ -916,7 +916,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
||||||
showIndividualPostIcons,
|
showIndividualPostIcons,
|
||||||
manuallyApproveFollowers,
|
manuallyApproveFollowers,
|
||||||
False, True, useCacheOnly,
|
False, True, useCacheOnly,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
_logTimelineTiming(enableTimingLog,
|
_logTimelineTiming(enableTimingLog,
|
||||||
timelineStartTime, boxName, '12')
|
timelineStartTime, boxName, '12')
|
||||||
|
|
||||||
|
@ -1142,7 +1142,7 @@ def htmlShares(cssCache: {}, defaultTimeline: str,
|
||||||
maxLikeCount: int,
|
maxLikeCount: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
signingPrivateKeyPem: str,
|
signingPrivateKeyPem: str,
|
||||||
CWlists: {}, listsEnabled: str) -> str:
|
CWlists: {}, lists_enabled: str) -> str:
|
||||||
"""Show the shares timeline as html
|
"""Show the shares timeline as html
|
||||||
"""
|
"""
|
||||||
manuallyApproveFollowers = \
|
manuallyApproveFollowers = \
|
||||||
|
@ -1169,7 +1169,7 @@ def htmlShares(cssCache: {}, defaultTimeline: str,
|
||||||
allowLocalNetworkAccess, textModeBanner,
|
allowLocalNetworkAccess, textModeBanner,
|
||||||
accessKeys, systemLanguage, maxLikeCount,
|
accessKeys, systemLanguage, maxLikeCount,
|
||||||
shared_items_federated_domains, signingPrivateKeyPem,
|
shared_items_federated_domains, signingPrivateKeyPem,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
|
|
||||||
|
|
||||||
def htmlWanted(cssCache: {}, defaultTimeline: str,
|
def htmlWanted(cssCache: {}, defaultTimeline: str,
|
||||||
|
@ -1197,7 +1197,7 @@ def htmlWanted(cssCache: {}, defaultTimeline: str,
|
||||||
maxLikeCount: int,
|
maxLikeCount: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
signingPrivateKeyPem: str,
|
signingPrivateKeyPem: str,
|
||||||
CWlists: {}, listsEnabled: str) -> str:
|
CWlists: {}, lists_enabled: str) -> str:
|
||||||
"""Show the wanted timeline as html
|
"""Show the wanted timeline as html
|
||||||
"""
|
"""
|
||||||
manuallyApproveFollowers = \
|
manuallyApproveFollowers = \
|
||||||
|
@ -1224,7 +1224,7 @@ def htmlWanted(cssCache: {}, defaultTimeline: str,
|
||||||
allowLocalNetworkAccess, textModeBanner,
|
allowLocalNetworkAccess, textModeBanner,
|
||||||
accessKeys, systemLanguage, maxLikeCount,
|
accessKeys, systemLanguage, maxLikeCount,
|
||||||
shared_items_federated_domains, signingPrivateKeyPem,
|
shared_items_federated_domains, signingPrivateKeyPem,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
|
|
||||||
|
|
||||||
def htmlInbox(cssCache: {}, defaultTimeline: str,
|
def htmlInbox(cssCache: {}, defaultTimeline: str,
|
||||||
|
@ -1253,7 +1253,7 @@ def htmlInbox(cssCache: {}, defaultTimeline: str,
|
||||||
maxLikeCount: int,
|
maxLikeCount: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
signingPrivateKeyPem: str,
|
signingPrivateKeyPem: str,
|
||||||
CWlists: {}, listsEnabled: str) -> str:
|
CWlists: {}, lists_enabled: str) -> str:
|
||||||
"""Show the inbox as html
|
"""Show the inbox as html
|
||||||
"""
|
"""
|
||||||
manuallyApproveFollowers = \
|
manuallyApproveFollowers = \
|
||||||
|
@ -1280,7 +1280,7 @@ def htmlInbox(cssCache: {}, defaultTimeline: str,
|
||||||
allowLocalNetworkAccess, textModeBanner,
|
allowLocalNetworkAccess, textModeBanner,
|
||||||
accessKeys, systemLanguage, maxLikeCount,
|
accessKeys, systemLanguage, maxLikeCount,
|
||||||
shared_items_federated_domains, signingPrivateKeyPem,
|
shared_items_federated_domains, signingPrivateKeyPem,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
|
|
||||||
|
|
||||||
def htmlBookmarks(cssCache: {}, defaultTimeline: str,
|
def htmlBookmarks(cssCache: {}, defaultTimeline: str,
|
||||||
|
@ -1309,7 +1309,7 @@ def htmlBookmarks(cssCache: {}, defaultTimeline: str,
|
||||||
maxLikeCount: int,
|
maxLikeCount: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
signingPrivateKeyPem: str,
|
signingPrivateKeyPem: str,
|
||||||
CWlists: {}, listsEnabled: str) -> str:
|
CWlists: {}, lists_enabled: str) -> str:
|
||||||
"""Show the bookmarks as html
|
"""Show the bookmarks as html
|
||||||
"""
|
"""
|
||||||
manuallyApproveFollowers = \
|
manuallyApproveFollowers = \
|
||||||
|
@ -1336,7 +1336,7 @@ def htmlBookmarks(cssCache: {}, defaultTimeline: str,
|
||||||
allowLocalNetworkAccess, textModeBanner,
|
allowLocalNetworkAccess, textModeBanner,
|
||||||
accessKeys, systemLanguage, maxLikeCount,
|
accessKeys, systemLanguage, maxLikeCount,
|
||||||
shared_items_federated_domains, signingPrivateKeyPem,
|
shared_items_federated_domains, signingPrivateKeyPem,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
|
|
||||||
|
|
||||||
def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
|
def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
|
||||||
|
@ -1365,7 +1365,7 @@ def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
|
||||||
maxLikeCount: int,
|
maxLikeCount: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
signingPrivateKeyPem: str,
|
signingPrivateKeyPem: str,
|
||||||
CWlists: {}, listsEnabled: str) -> str:
|
CWlists: {}, lists_enabled: str) -> str:
|
||||||
"""Show the DM timeline as html
|
"""Show the DM timeline as html
|
||||||
"""
|
"""
|
||||||
artist = isArtist(base_dir, nickname)
|
artist = isArtist(base_dir, nickname)
|
||||||
|
@ -1387,7 +1387,7 @@ def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
|
||||||
allowLocalNetworkAccess, textModeBanner,
|
allowLocalNetworkAccess, textModeBanner,
|
||||||
accessKeys, systemLanguage, maxLikeCount,
|
accessKeys, systemLanguage, maxLikeCount,
|
||||||
shared_items_federated_domains, signingPrivateKeyPem,
|
shared_items_federated_domains, signingPrivateKeyPem,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
|
|
||||||
|
|
||||||
def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
|
def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
|
||||||
|
@ -1416,7 +1416,7 @@ def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
|
||||||
maxLikeCount: int,
|
maxLikeCount: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
signingPrivateKeyPem: str,
|
signingPrivateKeyPem: str,
|
||||||
CWlists: {}, listsEnabled: str) -> str:
|
CWlists: {}, lists_enabled: str) -> str:
|
||||||
"""Show the replies timeline as html
|
"""Show the replies timeline as html
|
||||||
"""
|
"""
|
||||||
artist = isArtist(base_dir, nickname)
|
artist = isArtist(base_dir, nickname)
|
||||||
|
@ -1439,7 +1439,7 @@ def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
|
||||||
allowLocalNetworkAccess, textModeBanner,
|
allowLocalNetworkAccess, textModeBanner,
|
||||||
accessKeys, systemLanguage, maxLikeCount,
|
accessKeys, systemLanguage, maxLikeCount,
|
||||||
shared_items_federated_domains, signingPrivateKeyPem,
|
shared_items_federated_domains, signingPrivateKeyPem,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
|
|
||||||
|
|
||||||
def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
|
def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
|
||||||
|
@ -1468,7 +1468,7 @@ def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
|
||||||
maxLikeCount: int,
|
maxLikeCount: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
signingPrivateKeyPem: str,
|
signingPrivateKeyPem: str,
|
||||||
CWlists: {}, listsEnabled: str) -> str:
|
CWlists: {}, lists_enabled: str) -> str:
|
||||||
"""Show the media timeline as html
|
"""Show the media timeline as html
|
||||||
"""
|
"""
|
||||||
artist = isArtist(base_dir, nickname)
|
artist = isArtist(base_dir, nickname)
|
||||||
|
@ -1491,7 +1491,7 @@ def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
|
||||||
allowLocalNetworkAccess, textModeBanner,
|
allowLocalNetworkAccess, textModeBanner,
|
||||||
accessKeys, systemLanguage, maxLikeCount,
|
accessKeys, systemLanguage, maxLikeCount,
|
||||||
shared_items_federated_domains, signingPrivateKeyPem,
|
shared_items_federated_domains, signingPrivateKeyPem,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
|
|
||||||
|
|
||||||
def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
|
def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
|
||||||
|
@ -1520,7 +1520,7 @@ def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
|
||||||
maxLikeCount: int,
|
maxLikeCount: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
signingPrivateKeyPem: str,
|
signingPrivateKeyPem: str,
|
||||||
CWlists: {}, listsEnabled: str) -> str:
|
CWlists: {}, lists_enabled: str) -> str:
|
||||||
"""Show the blogs timeline as html
|
"""Show the blogs timeline as html
|
||||||
"""
|
"""
|
||||||
artist = isArtist(base_dir, nickname)
|
artist = isArtist(base_dir, nickname)
|
||||||
|
@ -1543,7 +1543,7 @@ def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
|
||||||
allowLocalNetworkAccess, textModeBanner,
|
allowLocalNetworkAccess, textModeBanner,
|
||||||
accessKeys, systemLanguage, maxLikeCount,
|
accessKeys, systemLanguage, maxLikeCount,
|
||||||
shared_items_federated_domains, signingPrivateKeyPem,
|
shared_items_federated_domains, signingPrivateKeyPem,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
|
|
||||||
|
|
||||||
def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
|
def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
|
||||||
|
@ -1573,7 +1573,7 @@ def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
|
||||||
maxLikeCount: int,
|
maxLikeCount: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
signingPrivateKeyPem: str,
|
signingPrivateKeyPem: str,
|
||||||
CWlists: {}, listsEnabled: str) -> str:
|
CWlists: {}, lists_enabled: str) -> str:
|
||||||
"""Show the features timeline as html
|
"""Show the features timeline as html
|
||||||
"""
|
"""
|
||||||
return htmlTimeline(cssCache, defaultTimeline,
|
return htmlTimeline(cssCache, defaultTimeline,
|
||||||
|
@ -1595,7 +1595,7 @@ def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
|
||||||
allowLocalNetworkAccess, textModeBanner,
|
allowLocalNetworkAccess, textModeBanner,
|
||||||
accessKeys, systemLanguage, maxLikeCount,
|
accessKeys, systemLanguage, maxLikeCount,
|
||||||
shared_items_federated_domains, signingPrivateKeyPem,
|
shared_items_federated_domains, signingPrivateKeyPem,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
|
|
||||||
|
|
||||||
def htmlInboxNews(cssCache: {}, defaultTimeline: str,
|
def htmlInboxNews(cssCache: {}, defaultTimeline: str,
|
||||||
|
@ -1624,7 +1624,7 @@ def htmlInboxNews(cssCache: {}, defaultTimeline: str,
|
||||||
maxLikeCount: int,
|
maxLikeCount: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
signingPrivateKeyPem: str,
|
signingPrivateKeyPem: str,
|
||||||
CWlists: {}, listsEnabled: str) -> str:
|
CWlists: {}, lists_enabled: str) -> str:
|
||||||
"""Show the news timeline as html
|
"""Show the news timeline as html
|
||||||
"""
|
"""
|
||||||
return htmlTimeline(cssCache, defaultTimeline,
|
return htmlTimeline(cssCache, defaultTimeline,
|
||||||
|
@ -1646,7 +1646,7 @@ def htmlInboxNews(cssCache: {}, defaultTimeline: str,
|
||||||
allowLocalNetworkAccess, textModeBanner,
|
allowLocalNetworkAccess, textModeBanner,
|
||||||
accessKeys, systemLanguage, maxLikeCount,
|
accessKeys, systemLanguage, maxLikeCount,
|
||||||
shared_items_federated_domains, signingPrivateKeyPem,
|
shared_items_federated_domains, signingPrivateKeyPem,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
|
|
||||||
|
|
||||||
def htmlOutbox(cssCache: {}, defaultTimeline: str,
|
def htmlOutbox(cssCache: {}, defaultTimeline: str,
|
||||||
|
@ -1675,7 +1675,7 @@ def htmlOutbox(cssCache: {}, defaultTimeline: str,
|
||||||
maxLikeCount: int,
|
maxLikeCount: int,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
signingPrivateKeyPem: str,
|
signingPrivateKeyPem: str,
|
||||||
CWlists: {}, listsEnabled: str) -> str:
|
CWlists: {}, lists_enabled: str) -> str:
|
||||||
"""Show the Outbox as html
|
"""Show the Outbox as html
|
||||||
"""
|
"""
|
||||||
manuallyApproveFollowers = \
|
manuallyApproveFollowers = \
|
||||||
|
@ -1699,4 +1699,4 @@ def htmlOutbox(cssCache: {}, defaultTimeline: str,
|
||||||
allowLocalNetworkAccess, textModeBanner,
|
allowLocalNetworkAccess, textModeBanner,
|
||||||
accessKeys, systemLanguage, maxLikeCount,
|
accessKeys, systemLanguage, maxLikeCount,
|
||||||
shared_items_federated_domains, signingPrivateKeyPem,
|
shared_items_federated_domains, signingPrivateKeyPem,
|
||||||
CWlists, listsEnabled)
|
CWlists, lists_enabled)
|
||||||
|
|
Loading…
Reference in New Issue