mirror of https://gitlab.com/bashrc2/epicyon
Snake case
parent
376ad52ed0
commit
2c02ed05eb
20
announce.py
20
announce.py
|
@ -122,7 +122,7 @@ def createAnnounce(session, base_dir: str, federationList: [],
|
|||
clientToServer: bool,
|
||||
sendThreads: [], postLog: [],
|
||||
personCache: {}, cachedWebfingers: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates an announce message
|
||||
Typically toUrl will be https://www.w3.org/ns/activitystreams#Public
|
||||
|
@ -180,7 +180,7 @@ def createAnnounce(session, base_dir: str, federationList: [],
|
|||
announceNickname, announceDomain, announcePort, None,
|
||||
http_prefix, True, clientToServer, federationList,
|
||||
sendThreads, postLog, cachedWebfingers, personCache,
|
||||
debug, projectVersion, None, groupAccount,
|
||||
debug, project_version, None, groupAccount,
|
||||
signingPrivateKeyPem, 639633)
|
||||
|
||||
return newAnnounce
|
||||
|
@ -191,7 +191,7 @@ def announcePublic(session, base_dir: str, federationList: [],
|
|||
objectUrl: str, clientToServer: bool,
|
||||
sendThreads: [], postLog: [],
|
||||
personCache: {}, cachedWebfingers: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Makes a public announcement
|
||||
"""
|
||||
|
@ -205,7 +205,7 @@ def announcePublic(session, base_dir: str, federationList: [],
|
|||
objectUrl, True, clientToServer,
|
||||
sendThreads, postLog,
|
||||
personCache, cachedWebfingers,
|
||||
debug, projectVersion,
|
||||
debug, project_version,
|
||||
signingPrivateKeyPem)
|
||||
|
||||
|
||||
|
@ -214,7 +214,7 @@ def sendAnnounceViaServer(base_dir: str, session,
|
|||
fromDomain: str, fromPort: int,
|
||||
http_prefix: str, repeatObjectUrl: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates an announce message via c2s
|
||||
"""
|
||||
|
@ -247,7 +247,7 @@ def sendAnnounceViaServer(base_dir: str, session,
|
|||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
fromDomain, projectVersion, debug, False,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
if debug:
|
||||
|
@ -268,7 +268,7 @@ def sendAnnounceViaServer(base_dir: str, session,
|
|||
originDomain,
|
||||
base_dir, session, wfRequest,
|
||||
personCache,
|
||||
projectVersion, http_prefix,
|
||||
project_version, http_prefix,
|
||||
fromNickname, fromDomain,
|
||||
postToBox, 73528)
|
||||
|
||||
|
@ -307,7 +307,7 @@ def sendUndoAnnounceViaServer(base_dir: str, session,
|
|||
domain: str, port: int,
|
||||
http_prefix: str, repeatObjectUrl: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Undo an announce message via c2s
|
||||
"""
|
||||
|
@ -332,7 +332,7 @@ def sendUndoAnnounceViaServer(base_dir: str, session,
|
|||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
domain, projectVersion, debug, False,
|
||||
domain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
if debug:
|
||||
|
@ -353,7 +353,7 @@ def sendUndoAnnounceViaServer(base_dir: str, session,
|
|||
originDomain,
|
||||
base_dir, session, wfRequest,
|
||||
personCache,
|
||||
projectVersion, http_prefix,
|
||||
project_version, http_prefix,
|
||||
nickname, domain,
|
||||
postToBox, 73528)
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ def sendAvailabilityViaServer(base_dir: str, session,
|
|||
http_prefix: str,
|
||||
status: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Sets the availability for a person via c2s
|
||||
"""
|
||||
|
@ -108,7 +108,7 @@ def sendAvailabilityViaServer(base_dir: str, session,
|
|||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
domain, projectVersion, debug, False,
|
||||
domain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
if debug:
|
||||
|
@ -127,7 +127,7 @@ def sendAvailabilityViaServer(base_dir: str, session,
|
|||
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||
originDomain,
|
||||
base_dir, session, wfRequest,
|
||||
personCache, projectVersion,
|
||||
personCache, project_version,
|
||||
http_prefix, nickname,
|
||||
domain, postToBox, 57262)
|
||||
|
||||
|
|
16
bookmarks.py
16
bookmarks.py
|
@ -254,7 +254,7 @@ def bookmark(recentPostsCache: {},
|
|||
clientToServer: bool,
|
||||
sendThreads: [], postLog: [],
|
||||
personCache: {}, cachedWebfingers: {},
|
||||
debug: bool, projectVersion: str) -> {}:
|
||||
debug: bool, project_version: str) -> {}:
|
||||
"""Creates a bookmark
|
||||
actor is the person doing the bookmarking
|
||||
'to' might be a specific person (actor) whose post was bookmarked
|
||||
|
@ -313,7 +313,7 @@ def undoBookmark(recentPostsCache: {},
|
|||
clientToServer: bool,
|
||||
sendThreads: [], postLog: [],
|
||||
personCache: {}, cachedWebfingers: {},
|
||||
debug: bool, projectVersion: str) -> {}:
|
||||
debug: bool, project_version: str) -> {}:
|
||||
"""Removes a bookmark
|
||||
actor is the person doing the bookmarking
|
||||
'to' might be a specific person (actor) whose post was bookmarked
|
||||
|
@ -373,7 +373,7 @@ def sendBookmarkViaServer(base_dir: str, session,
|
|||
domain: str, fromPort: int,
|
||||
http_prefix: str, bookmarkUrl: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates a bookmark via c2s
|
||||
"""
|
||||
|
@ -403,7 +403,7 @@ def sendBookmarkViaServer(base_dir: str, session,
|
|||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
domain, projectVersion, debug, False,
|
||||
domain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
if debug:
|
||||
|
@ -423,7 +423,7 @@ def sendBookmarkViaServer(base_dir: str, session,
|
|||
originDomain,
|
||||
base_dir, session, wfRequest,
|
||||
personCache,
|
||||
projectVersion, http_prefix,
|
||||
project_version, http_prefix,
|
||||
nickname, domain,
|
||||
postToBox, 58391)
|
||||
|
||||
|
@ -463,7 +463,7 @@ def sendUndoBookmarkViaServer(base_dir: str, session,
|
|||
domain: str, fromPort: int,
|
||||
http_prefix: str, bookmarkUrl: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Removes a bookmark via c2s
|
||||
"""
|
||||
|
@ -493,7 +493,7 @@ def sendUndoBookmarkViaServer(base_dir: str, session,
|
|||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
domain, projectVersion, debug, False,
|
||||
domain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
if debug:
|
||||
|
@ -513,7 +513,7 @@ def sendUndoBookmarkViaServer(base_dir: str, session,
|
|||
originDomain,
|
||||
base_dir, session, wfRequest,
|
||||
personCache,
|
||||
projectVersion, http_prefix,
|
||||
project_version, http_prefix,
|
||||
nickname, domain,
|
||||
postToBox, 52594)
|
||||
|
||||
|
|
4
cache.py
4
cache.py
|
@ -138,7 +138,7 @@ def getWebfingerFromCache(handle: str, cachedWebfingers: {}) -> {}:
|
|||
|
||||
def getPersonPubKey(base_dir: str, session, personUrl: str,
|
||||
personCache: {}, debug: bool,
|
||||
projectVersion: str, http_prefix: str,
|
||||
project_version: str, http_prefix: str,
|
||||
domain: str, onionDomain: str,
|
||||
signingPrivateKeyPem: str) -> str:
|
||||
if not personUrl:
|
||||
|
@ -168,7 +168,7 @@ def getPersonPubKey(base_dir: str, session, personUrl: str,
|
|||
personJson = \
|
||||
getJson(signingPrivateKeyPem,
|
||||
session, personUrl, asHeader, None, debug,
|
||||
projectVersion, http_prefix, personDomain)
|
||||
project_version, http_prefix, personDomain)
|
||||
if not personJson:
|
||||
return None
|
||||
pubKey = None
|
||||
|
|
183
daemon.py
183
daemon.py
|
@ -523,7 +523,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
# name field contains the answer
|
||||
messageJson['object']['name'] = answer
|
||||
if self._postToOutbox(messageJson,
|
||||
self.server.projectVersion, nickname):
|
||||
self.server.project_version, nickname):
|
||||
postFilename = \
|
||||
locatePost(self.server.base_dir, nickname,
|
||||
self.server.domain, messageId)
|
||||
|
@ -735,7 +735,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
getPersonPubKey(self.server.base_dir,
|
||||
self.server.session, keyId,
|
||||
self.server.personCache, self.server.debug,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
self.server.http_prefix,
|
||||
self.server.domain, self.server.onionDomain,
|
||||
self.server.signingPrivateKeyPem)
|
||||
|
@ -1047,7 +1047,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
translate: {},
|
||||
registration: bool,
|
||||
systemLanguage: str,
|
||||
projectVersion: str,
|
||||
project_version: str,
|
||||
customEmoji: [],
|
||||
show_node_info_accounts: bool) -> bool:
|
||||
"""This is a vestigil mastodon API for the purpose
|
||||
|
@ -1075,7 +1075,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
translate,
|
||||
registration,
|
||||
systemLanguage,
|
||||
projectVersion,
|
||||
project_version,
|
||||
customEmoji,
|
||||
show_node_info_accounts,
|
||||
broch_mode)
|
||||
|
@ -1111,14 +1111,14 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
translate: {},
|
||||
registration: bool,
|
||||
systemLanguage: str,
|
||||
projectVersion: str,
|
||||
project_version: str,
|
||||
customEmoji: [],
|
||||
show_node_info_accounts: bool) -> bool:
|
||||
return self._mastoApiV1(path, callingDomain, uaStr, authorized,
|
||||
http_prefix, base_dir, nickname, domain,
|
||||
domainFull, onionDomain, i2pDomain,
|
||||
translate, registration, systemLanguage,
|
||||
projectVersion, customEmoji,
|
||||
project_version, customEmoji,
|
||||
show_node_info_accounts)
|
||||
|
||||
def _nodeinfo(self, uaStr: str, callingDomain: str) -> bool:
|
||||
|
@ -1135,7 +1135,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
# migrate, and that information may be useful to an adversary
|
||||
broch_mode = broch_modeIsActive(self.server.base_dir)
|
||||
|
||||
nodeInfoVersion = self.server.projectVersion
|
||||
nodeInfoVersion = self.server.project_version
|
||||
if not self.server.show_node_info_version or broch_mode:
|
||||
nodeInfoVersion = '0.0.0'
|
||||
|
||||
|
@ -1356,7 +1356,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.outboxThread[accountOutboxThreadName][index] = \
|
||||
threadWithTrace(target=self._postToOutbox,
|
||||
args=(messageJson.copy(),
|
||||
self.server.projectVersion, None),
|
||||
self.server.project_version, None),
|
||||
daemon=True)
|
||||
print('Starting outbox thread')
|
||||
self.server.outboxThread[accountOutboxThreadName][index].start()
|
||||
|
@ -2719,7 +2719,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.personCache,
|
||||
self.server.port,
|
||||
None,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
self.server.show_published_date_only,
|
||||
|
@ -2853,7 +2853,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.personCache,
|
||||
self.server.port,
|
||||
None,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
self.server.show_published_date_only,
|
||||
|
@ -3049,7 +3049,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.postLog,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.personCache, debug,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
self.server.signingPrivateKeyPem)
|
||||
if callingDomain.endswith('.onion') and onionDomain:
|
||||
originPathStr = 'http://' + onionDomain + usersPath
|
||||
|
@ -3302,7 +3302,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.cachedWebfingers,
|
||||
self.server.personCache,
|
||||
http_prefix,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
self.server.show_published_date_only,
|
||||
|
@ -3391,7 +3391,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
searchStr,
|
||||
maxPostsInFeed,
|
||||
pageNumber,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
self.server.recentPostsCache,
|
||||
self.server.max_recent_posts,
|
||||
self.server.session,
|
||||
|
@ -3459,7 +3459,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
searchStr,
|
||||
maxPostsInFeed,
|
||||
pageNumber,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
self.server.recentPostsCache,
|
||||
self.server.max_recent_posts,
|
||||
self.server.session,
|
||||
|
@ -3563,7 +3563,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.cachedWebfingers,
|
||||
self.server.personCache,
|
||||
self.server.debug,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
self.server.yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
show_published_date_only,
|
||||
|
@ -6514,7 +6514,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
updateActorJson = getActorUpdateJson(actorJson)
|
||||
print('Sending actor update: ' + str(updateActorJson))
|
||||
self._postToOutbox(updateActorJson,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
nickname)
|
||||
|
||||
# deactivate the account
|
||||
|
@ -7542,7 +7542,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.cachedWebfingers,
|
||||
self.server.personCache,
|
||||
http_prefix,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
self.server.show_published_date_only,
|
||||
|
@ -7605,7 +7605,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.cachedWebfingers,
|
||||
self.server.personCache,
|
||||
http_prefix,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
self.server.systemLanguage)
|
||||
|
@ -7699,7 +7699,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.personCache,
|
||||
self.server.cachedWebfingers,
|
||||
debug,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
self.server.signingPrivateKeyPem)
|
||||
announceFilename = None
|
||||
if announceJson:
|
||||
|
@ -7718,7 +7718,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
|
||||
# send out the announce within a separate thread
|
||||
self._postToOutbox(announceJson,
|
||||
self.server.projectVersion, self.postToNickname)
|
||||
self.server.project_version,
|
||||
self.postToNickname)
|
||||
|
||||
fitnessPerformance(GETstartTime, self.server.fitness,
|
||||
'_GET', '_announceButton postToOutboxThread',
|
||||
|
@ -7753,7 +7754,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.port, announceJson,
|
||||
None, True,
|
||||
self.server.allowDeletion,
|
||||
http_prefix, self.server.projectVersion,
|
||||
http_prefix, self.server.project_version,
|
||||
timelineStr,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
|
@ -7869,7 +7870,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
debug, recentPostsCache)
|
||||
|
||||
self._postToOutbox(newUndoAnnounce,
|
||||
self.server.projectVersion, self.postToNickname)
|
||||
self.server.project_version, self.postToNickname)
|
||||
|
||||
actorAbsolute = self._getInstanceUrl(callingDomain) + actor
|
||||
actorPathStr = \
|
||||
|
@ -7912,7 +7913,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.cachedWebfingers,
|
||||
self.server.personCache,
|
||||
debug,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
self.server.signingPrivateKeyPem)
|
||||
originPathStrAbsolute = \
|
||||
http_prefix + '://' + domainFull + originPathStr
|
||||
|
@ -8067,7 +8068,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.cachedWebfingers,
|
||||
self.server.personCache,
|
||||
debug,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
self.server.signingPrivateKeyPem)
|
||||
originPathStrAbsolute = \
|
||||
http_prefix + '://' + domainFull + originPathStr
|
||||
|
@ -8156,7 +8157,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
}
|
||||
|
||||
# send out the like to followers
|
||||
self._postToOutbox(likeJson, self.server.projectVersion, None)
|
||||
self._postToOutbox(likeJson, self.server.project_version, None)
|
||||
|
||||
fitnessPerformance(GETstartTime, self.server.fitness,
|
||||
'_GET', '_likeButton postToOutbox',
|
||||
|
@ -8213,7 +8214,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
None, True,
|
||||
self.server.allowDeletion,
|
||||
http_prefix,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
timelineStr,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
|
@ -8325,7 +8326,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
}
|
||||
|
||||
# send out the undo like to followers
|
||||
self._postToOutbox(undoLikeJson, self.server.projectVersion, None)
|
||||
self._postToOutbox(undoLikeJson, self.server.project_version, None)
|
||||
|
||||
# directly undo the like within the post file
|
||||
if not likedPostFilename:
|
||||
|
@ -8368,7 +8369,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
None, True,
|
||||
self.server.allowDeletion,
|
||||
http_prefix,
|
||||
self.server.projectVersion, timelineStr,
|
||||
self.server.project_version, timelineStr,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
self.server.show_published_date_only,
|
||||
|
@ -8489,7 +8490,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
}
|
||||
|
||||
# send out the emoji reaction to followers
|
||||
self._postToOutbox(reactionJson, self.server.projectVersion, None)
|
||||
self._postToOutbox(reactionJson, self.server.project_version, None)
|
||||
|
||||
fitnessPerformance(GETstartTime, self.server.fitness,
|
||||
'_GET', '_reactionButton postToOutbox',
|
||||
|
@ -8551,7 +8552,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
None, True,
|
||||
self.server.allowDeletion,
|
||||
http_prefix,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
timelineStr,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
|
@ -8677,7 +8678,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
}
|
||||
|
||||
# send out the undo emoji reaction to followers
|
||||
self._postToOutbox(undoReactionJson, self.server.projectVersion, None)
|
||||
self._postToOutbox(undoReactionJson, self.server.project_version, None)
|
||||
|
||||
# directly undo the emoji reaction within the post file
|
||||
if not reactionPostFilename:
|
||||
|
@ -8724,7 +8725,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
None, True,
|
||||
self.server.allowDeletion,
|
||||
http_prefix,
|
||||
self.server.projectVersion, timelineStr,
|
||||
self.server.project_version, timelineStr,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
self.server.show_published_date_only,
|
||||
|
@ -8822,7 +8823,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.postToNickname,
|
||||
domain, port, postJsonObject,
|
||||
self.server.http_prefix,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
self.server.show_published_date_only,
|
||||
|
@ -8909,7 +8910,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.personCache,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.debug,
|
||||
self.server.projectVersion)
|
||||
self.server.project_version)
|
||||
# clear the icon from the cache so that it gets updated
|
||||
if self.server.iconsCache.get('bookmark.png'):
|
||||
del self.server.iconsCache['bookmark.png']
|
||||
|
@ -8943,7 +8944,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.port, bookmarkPostJson,
|
||||
None, True,
|
||||
self.server.allowDeletion,
|
||||
http_prefix, self.server.projectVersion,
|
||||
http_prefix, self.server.project_version,
|
||||
timelineStr,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
|
@ -8961,7 +8962,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.lists_enabled)
|
||||
else:
|
||||
print('WARN: Bookmarked post not found: ' + bookmarkFilename)
|
||||
# self._postToOutbox(bookmarkJson, self.server.projectVersion, None)
|
||||
# self._postToOutbox(bookmarkJson, self.server.project_version, None)
|
||||
actorAbsolute = self._getInstanceUrl(callingDomain) + actor
|
||||
actorPathStr = \
|
||||
actorAbsolute + '/' + timelineStr + \
|
||||
|
@ -9035,12 +9036,12 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.personCache,
|
||||
self.server.cachedWebfingers,
|
||||
debug,
|
||||
self.server.projectVersion)
|
||||
self.server.project_version)
|
||||
# clear the icon from the cache so that it gets updated
|
||||
if self.server.iconsCache.get('bookmark_inactive.png'):
|
||||
del self.server.iconsCache['bookmark_inactive.png']
|
||||
# self._postToOutbox(undoBookmarkJson,
|
||||
# self.server.projectVersion, None)
|
||||
# self.server.project_version, None)
|
||||
bookmarkFilename = \
|
||||
locatePost(base_dir, self.postToNickname, domain, bookmarkUrl)
|
||||
if bookmarkFilename:
|
||||
|
@ -9072,7 +9073,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
None, True,
|
||||
self.server.allowDeletion,
|
||||
http_prefix,
|
||||
self.server.projectVersion, timelineStr,
|
||||
self.server.project_version, timelineStr,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
self.server.show_published_date_only,
|
||||
|
@ -9167,7 +9168,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.translate, pageNumber,
|
||||
self.server.session, base_dir,
|
||||
deleteUrl, http_prefix,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.personCache, callingDomain,
|
||||
self.server.yt_replace_domain,
|
||||
|
@ -9274,7 +9275,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
avatarUrl, showAvatarOptions,
|
||||
self.server.allowDeletion,
|
||||
http_prefix,
|
||||
self.server.projectVersion, timelineStr,
|
||||
self.server.project_version, timelineStr,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
self.server.show_published_date_only,
|
||||
|
@ -9384,7 +9385,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
avatarUrl, showAvatarOptions,
|
||||
self.server.allowDeletion,
|
||||
http_prefix,
|
||||
self.server.projectVersion, timelineStr,
|
||||
self.server.project_version, timelineStr,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
self.server.show_published_date_only,
|
||||
|
@ -9487,7 +9488,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
session = self.server.session
|
||||
cachedWebfingers = self.server.cachedWebfingers
|
||||
personCache = self.server.personCache
|
||||
projectVersion = self.server.projectVersion
|
||||
project_version = self.server.project_version
|
||||
ytDomain = self.server.yt_replace_domain
|
||||
twitterReplacementDomain = \
|
||||
self.server.twitterReplacementDomain
|
||||
|
@ -9506,7 +9507,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
port,
|
||||
repliesJson,
|
||||
http_prefix,
|
||||
projectVersion,
|
||||
project_version,
|
||||
ytDomain,
|
||||
twitterReplacementDomain,
|
||||
self.server.show_published_date_only,
|
||||
|
@ -9579,7 +9580,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
session = self.server.session
|
||||
cachedWebfingers = self.server.cachedWebfingers
|
||||
personCache = self.server.personCache
|
||||
projectVersion = self.server.projectVersion
|
||||
project_version = self.server.project_version
|
||||
ytDomain = self.server.yt_replace_domain
|
||||
twitterReplacementDomain = \
|
||||
self.server.twitterReplacementDomain
|
||||
|
@ -9598,7 +9599,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
port,
|
||||
repliesJson,
|
||||
http_prefix,
|
||||
projectVersion,
|
||||
project_version,
|
||||
ytDomain,
|
||||
twitterReplacementDomain,
|
||||
self.server.show_published_date_only,
|
||||
|
@ -9696,7 +9697,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
recentPostsCache,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
base_dir, http_prefix, True,
|
||||
getPerson, 'roles',
|
||||
self.server.session,
|
||||
|
@ -9812,7 +9813,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
recentPostsCache,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
base_dir, http_prefix, True,
|
||||
getPerson, 'skills',
|
||||
self.server.session,
|
||||
|
@ -9987,7 +9988,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
authorized,
|
||||
postJsonObject,
|
||||
http_prefix,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
likedBy, reactBy, reactEmoji,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
|
@ -10157,7 +10158,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
cachedWebfingers: {},
|
||||
personCache: {},
|
||||
allowDeletion: bool,
|
||||
projectVersion: str,
|
||||
project_version: str,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str) -> bool:
|
||||
"""Shows the inbox timeline
|
||||
|
@ -10241,7 +10242,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
inboxFeed,
|
||||
allowDeletion,
|
||||
http_prefix,
|
||||
projectVersion,
|
||||
project_version,
|
||||
minimalNick,
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
|
@ -10392,7 +10393,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
inboxDMFeed,
|
||||
self.server.allowDeletion,
|
||||
http_prefix,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
minimalNick,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
|
@ -10535,7 +10536,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
inboxRepliesFeed,
|
||||
self.server.allowDeletion,
|
||||
http_prefix,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
minimalNick,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
|
@ -10676,7 +10677,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
inboxMediaFeed,
|
||||
self.server.allowDeletion,
|
||||
http_prefix,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
minimalNick,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
|
@ -10818,7 +10819,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
inboxBlogsFeed,
|
||||
self.server.allowDeletion,
|
||||
http_prefix,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
minimalNick,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
|
@ -10969,7 +10970,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
inboxNewsFeed,
|
||||
self.server.allowDeletion,
|
||||
http_prefix,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
minimalNick,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
|
@ -11119,7 +11120,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
inboxFeaturesFeed,
|
||||
self.server.allowDeletion,
|
||||
http_prefix,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
minimalNick,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
|
@ -11229,7 +11230,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
port,
|
||||
self.server.allowDeletion,
|
||||
http_prefix,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
self.server.show_published_date_only,
|
||||
|
@ -11314,7 +11315,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
port,
|
||||
self.server.allowDeletion,
|
||||
http_prefix,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
self.server.show_published_date_only,
|
||||
|
@ -11435,7 +11436,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
bookmarksFeed,
|
||||
self.server.allowDeletion,
|
||||
http_prefix,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
minimalNick,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
|
@ -11573,7 +11574,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
outboxFeed,
|
||||
self.server.allowDeletion,
|
||||
http_prefix,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
minimalNick,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
|
@ -11708,7 +11709,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
moderationFeed,
|
||||
True,
|
||||
http_prefix,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
self.server.yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
show_published_date_only,
|
||||
|
@ -11828,7 +11829,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.recentPostsCache,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
base_dir, http_prefix,
|
||||
authorized,
|
||||
getPerson, sharesFileType,
|
||||
|
@ -11949,7 +11950,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.recentPostsCache,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
base_dir, http_prefix,
|
||||
authorized,
|
||||
getPerson, 'following',
|
||||
|
@ -12068,7 +12069,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.recentPostsCache,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
base_dir,
|
||||
http_prefix,
|
||||
authorized,
|
||||
|
@ -12204,7 +12205,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.recentPostsCache,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
base_dir,
|
||||
http_prefix,
|
||||
authorized,
|
||||
|
@ -12978,7 +12979,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.personCache,
|
||||
self.server.port,
|
||||
postJsonObject,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain,
|
||||
self.server.show_published_date_only,
|
||||
|
@ -13231,7 +13232,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
'to': [toUrl],
|
||||
'cc': [ccUrl]
|
||||
}
|
||||
self._postToOutbox(blockJson, self.server.projectVersion,
|
||||
self._postToOutbox(blockJson, self.server.project_version,
|
||||
blockerNickname)
|
||||
return True
|
||||
|
||||
|
@ -13687,7 +13688,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.translate,
|
||||
self.server.registration,
|
||||
self.server.systemLanguage,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
self.server.customEmoji,
|
||||
self.server.show_node_info_accounts):
|
||||
return
|
||||
|
@ -15908,7 +15909,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.cachedWebfingers,
|
||||
self.server.personCache,
|
||||
self.server.allowDeletion,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitterReplacementDomain):
|
||||
self.server.GETbusy = False
|
||||
|
@ -16635,7 +16636,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
followersOnly)
|
||||
return 1
|
||||
if self._postToOutbox(messageJson,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
nickname):
|
||||
populateReplies(self.server.base_dir,
|
||||
self.server.http_prefix,
|
||||
|
@ -16711,7 +16712,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if fields['schedulePost']:
|
||||
return 1
|
||||
if self._postToOutbox(messageJson,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
nickname):
|
||||
refreshNewswire(self.server.base_dir)
|
||||
populateReplies(self.server.base_dir,
|
||||
|
@ -16862,7 +16863,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if fields['schedulePost']:
|
||||
return 1
|
||||
if self._postToOutbox(messageJson,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
nickname):
|
||||
populateReplies(self.server.base_dir,
|
||||
self.server.http_prefix,
|
||||
|
@ -16914,7 +16915,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if fields['schedulePost']:
|
||||
return 1
|
||||
if self._postToOutbox(messageJson,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
nickname):
|
||||
populateReplies(self.server.base_dir,
|
||||
self.server.http_prefix,
|
||||
|
@ -16973,7 +16974,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
print('Sending new DM to ' +
|
||||
str(messageJson['object']['to']))
|
||||
if self._postToOutbox(messageJson,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
nickname):
|
||||
populateReplies(self.server.base_dir,
|
||||
self.server.http_prefix,
|
||||
|
@ -17027,7 +17028,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
print('DEBUG: new reminder to ' +
|
||||
str(messageJson['object']['to']))
|
||||
if self._postToOutbox(messageJson,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
nickname):
|
||||
return 1
|
||||
else:
|
||||
|
@ -17060,7 +17061,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.content_license_url)
|
||||
if messageJson:
|
||||
if self._postToOutbox(messageJson,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
nickname):
|
||||
return 1
|
||||
else:
|
||||
|
@ -17104,7 +17105,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if self.server.debug:
|
||||
print('DEBUG: new Question')
|
||||
if self._postToOutbox(messageJson,
|
||||
self.server.projectVersion,
|
||||
self.server.project_version,
|
||||
nickname):
|
||||
return 1
|
||||
return -1
|
||||
|
@ -18211,7 +18212,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
# https://www.w3.org/TR/activitypub/#object-without-create
|
||||
if self.outboxAuthenticated:
|
||||
if self._postToOutbox(messageJson,
|
||||
self.server.projectVersion, None):
|
||||
self.server.project_version, None):
|
||||
if messageJson.get('id'):
|
||||
locnStr = removeIdEnding(messageJson['id'])
|
||||
self.headers['Location'] = locnStr
|
||||
|
@ -18363,7 +18364,7 @@ def runSharesExpire(versionNumber: str, base_dir: str) -> None:
|
|||
expireShares(base_dir)
|
||||
|
||||
|
||||
def runPostsWatchdog(projectVersion: str, httpd) -> None:
|
||||
def runPostsWatchdog(project_version: str, httpd) -> None:
|
||||
"""This tries to keep the posts thread running even if it dies
|
||||
"""
|
||||
print('Starting posts queue watchdog')
|
||||
|
@ -18379,7 +18380,7 @@ def runPostsWatchdog(projectVersion: str, httpd) -> None:
|
|||
print('Restarting posts queue...')
|
||||
|
||||
|
||||
def runSharesExpireWatchdog(projectVersion: str, httpd) -> None:
|
||||
def runSharesExpireWatchdog(project_version: str, httpd) -> None:
|
||||
"""This tries to keep the shares expiry thread running even if it dies
|
||||
"""
|
||||
print('Starting shares expiry watchdog')
|
||||
|
@ -18454,7 +18455,7 @@ def runDaemon(content_license_url: str,
|
|||
media_instance: bool,
|
||||
max_recent_posts: int,
|
||||
enable_shared_inbox: bool, registration: bool,
|
||||
language: str, projectVersion: str,
|
||||
language: str, project_version: str,
|
||||
instanceId: str, clientToServer: bool,
|
||||
base_dir: str, domain: str,
|
||||
onionDomain: str, i2pDomain: str,
|
||||
|
@ -18706,7 +18707,7 @@ def runDaemon(content_license_url: str,
|
|||
httpd.outboxThread = {}
|
||||
httpd.outboxThreadIndex = {}
|
||||
httpd.newPostThread = {}
|
||||
httpd.projectVersion = projectVersion
|
||||
httpd.project_version = project_version
|
||||
httpd.secureMode = secureMode
|
||||
# max POST size of 30M
|
||||
httpd.maxPostLength = 1024 * 1024 * 30
|
||||
|
@ -18867,7 +18868,7 @@ def runDaemon(content_license_url: str,
|
|||
if not unitTest:
|
||||
httpd.thrPostsWatchdog = \
|
||||
threadWithTrace(target=runPostsWatchdog,
|
||||
args=(projectVersion, httpd), daemon=True)
|
||||
args=(project_version, httpd), daemon=True)
|
||||
httpd.thrPostsWatchdog.start()
|
||||
else:
|
||||
httpd.thrPostsQueue.start()
|
||||
|
@ -18875,11 +18876,11 @@ def runDaemon(content_license_url: str,
|
|||
print('Creating expire thread for shared items')
|
||||
httpd.thrSharesExpire = \
|
||||
threadWithTrace(target=runSharesExpire,
|
||||
args=(projectVersion, base_dir), daemon=True)
|
||||
args=(project_version, base_dir), daemon=True)
|
||||
if not unitTest:
|
||||
httpd.thrSharesExpireWatchdog = \
|
||||
threadWithTrace(target=runSharesExpireWatchdog,
|
||||
args=(projectVersion, httpd), daemon=True)
|
||||
args=(project_version, httpd), daemon=True)
|
||||
httpd.thrSharesExpireWatchdog.start()
|
||||
else:
|
||||
httpd.thrSharesExpire.start()
|
||||
|
@ -18908,7 +18909,7 @@ def runDaemon(content_license_url: str,
|
|||
httpd.thrInboxQueue = \
|
||||
threadWithTrace(target=runInboxQueue,
|
||||
args=(httpd.recentPostsCache, httpd.max_recent_posts,
|
||||
projectVersion,
|
||||
project_version,
|
||||
base_dir, http_prefix, httpd.sendThreads,
|
||||
httpd.postLog, httpd.cachedWebfingers,
|
||||
httpd.personCache, httpd.inboxQueue,
|
||||
|
@ -18969,25 +18970,25 @@ def runDaemon(content_license_url: str,
|
|||
print('Creating inbox queue watchdog')
|
||||
httpd.thrWatchdog = \
|
||||
threadWithTrace(target=runInboxQueueWatchdog,
|
||||
args=(projectVersion, httpd), daemon=True)
|
||||
args=(project_version, httpd), daemon=True)
|
||||
httpd.thrWatchdog.start()
|
||||
|
||||
print('Creating scheduled post watchdog')
|
||||
httpd.thrWatchdogSchedule = \
|
||||
threadWithTrace(target=runPostScheduleWatchdog,
|
||||
args=(projectVersion, httpd), daemon=True)
|
||||
args=(project_version, httpd), daemon=True)
|
||||
httpd.thrWatchdogSchedule.start()
|
||||
|
||||
print('Creating newswire watchdog')
|
||||
httpd.thrNewswireWatchdog = \
|
||||
threadWithTrace(target=runNewswireWatchdog,
|
||||
args=(projectVersion, httpd), daemon=True)
|
||||
args=(project_version, httpd), daemon=True)
|
||||
httpd.thrNewswireWatchdog.start()
|
||||
|
||||
print('Creating federated shares watchdog')
|
||||
httpd.thrFederatedSharesWatchdog = \
|
||||
threadWithTrace(target=runFederatedSharesWatchdog,
|
||||
args=(projectVersion, httpd), daemon=True)
|
||||
args=(project_version, httpd), daemon=True)
|
||||
httpd.thrFederatedSharesWatchdog.start()
|
||||
else:
|
||||
print('Starting inbox queue')
|
||||
|
|
|
@ -31,7 +31,7 @@ def sendDeleteViaServer(base_dir: str, session,
|
|||
fromDomain: str, fromPort: int,
|
||||
http_prefix: str, deleteObjectUrl: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates a delete request message via c2s
|
||||
"""
|
||||
|
@ -59,7 +59,7 @@ def sendDeleteViaServer(base_dir: str, session,
|
|||
# lookup the inbox for the To handle
|
||||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix, cachedWebfingers,
|
||||
fromDomain, projectVersion, debug, False,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
if debug:
|
||||
|
@ -78,7 +78,7 @@ def sendDeleteViaServer(base_dir: str, session,
|
|||
fromPersonId, sharedInbox, avatarUrl,
|
||||
displayName, _) = getPersonBox(signingPrivateKeyPem, originDomain,
|
||||
base_dir, session, wfRequest, personCache,
|
||||
projectVersion, http_prefix, fromNickname,
|
||||
project_version, http_prefix, fromNickname,
|
||||
fromDomain, postToBox, 53036)
|
||||
|
||||
if not inboxUrl:
|
||||
|
|
34
follow.py
34
follow.py
|
@ -720,7 +720,7 @@ def followedAccountAccepts(session, base_dir: str, http_prefix: str,
|
|||
personUrl: str, federationList: [],
|
||||
followJson: {}, sendThreads: [], postLog: [],
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
removeFollowActivity: bool,
|
||||
signingPrivateKeyPem: str):
|
||||
"""The person receiving a follow request accepts the new follower
|
||||
|
@ -771,7 +771,7 @@ def followedAccountAccepts(session, base_dir: str, http_prefix: str,
|
|||
http_prefix, True, clientToServer,
|
||||
federationList,
|
||||
sendThreads, postLog, cachedWebfingers,
|
||||
personCache, debug, projectVersion, None,
|
||||
personCache, debug, project_version, None,
|
||||
groupAccount, signingPrivateKeyPem,
|
||||
7856837)
|
||||
|
||||
|
@ -783,7 +783,7 @@ def followedAccountRejects(session, base_dir: str, http_prefix: str,
|
|||
federationList: [],
|
||||
sendThreads: [], postLog: [],
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str):
|
||||
"""The person receiving a follow request rejects the new follower
|
||||
and sends back a Reject activity
|
||||
|
@ -839,7 +839,7 @@ def followedAccountRejects(session, base_dir: str, http_prefix: str,
|
|||
http_prefix, True, clientToServer,
|
||||
federationList,
|
||||
sendThreads, postLog, cachedWebfingers,
|
||||
personCache, debug, projectVersion, None,
|
||||
personCache, debug, project_version, None,
|
||||
groupAccount, signingPrivateKeyPem,
|
||||
6393063)
|
||||
|
||||
|
@ -852,7 +852,7 @@ def sendFollowRequest(session, base_dir: str,
|
|||
clientToServer: bool, federationList: [],
|
||||
sendThreads: [], postLog: [], cachedWebfingers: {},
|
||||
personCache: {}, debug: bool,
|
||||
projectVersion: str, signingPrivateKeyPem: str) -> {}:
|
||||
project_version: str, signingPrivateKeyPem: str) -> {}:
|
||||
"""Gets the json object for sending a follow request
|
||||
"""
|
||||
if not signingPrivateKeyPem:
|
||||
|
@ -931,7 +931,7 @@ def sendFollowRequest(session, base_dir: str,
|
|||
http_prefix, True, clientToServer,
|
||||
federationList,
|
||||
sendThreads, postLog, cachedWebfingers, personCache,
|
||||
debug, projectVersion, None, groupAccount,
|
||||
debug, project_version, None, groupAccount,
|
||||
signingPrivateKeyPem, 8234389)
|
||||
|
||||
return newFollowJson
|
||||
|
@ -944,7 +944,7 @@ def sendFollowRequestViaServer(base_dir: str, session,
|
|||
followPort: int,
|
||||
http_prefix: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates a follow request via c2s
|
||||
"""
|
||||
|
@ -974,7 +974,7 @@ def sendFollowRequestViaServer(base_dir: str, session,
|
|||
# lookup the inbox for the To handle
|
||||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix, cachedWebfingers,
|
||||
fromDomain, projectVersion, debug, False,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
if debug:
|
||||
|
@ -993,7 +993,7 @@ def sendFollowRequestViaServer(base_dir: str, session,
|
|||
fromPersonId, sharedInbox, avatarUrl,
|
||||
displayName, _) = getPersonBox(signingPrivateKeyPem, originDomain,
|
||||
base_dir, session, wfRequest, personCache,
|
||||
projectVersion, http_prefix, fromNickname,
|
||||
project_version, http_prefix, fromNickname,
|
||||
fromDomain, postToBox, 52025)
|
||||
|
||||
if not inboxUrl:
|
||||
|
@ -1034,7 +1034,7 @@ def sendUnfollowRequestViaServer(base_dir: str, session,
|
|||
followPort: int,
|
||||
http_prefix: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates a unfollow request via c2s
|
||||
"""
|
||||
|
@ -1068,7 +1068,7 @@ def sendUnfollowRequestViaServer(base_dir: str, session,
|
|||
# lookup the inbox for the To handle
|
||||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix, cachedWebfingers,
|
||||
fromDomain, projectVersion, debug, False,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
if debug:
|
||||
|
@ -1088,7 +1088,7 @@ def sendUnfollowRequestViaServer(base_dir: str, session,
|
|||
originDomain,
|
||||
base_dir, session,
|
||||
wfRequest, personCache,
|
||||
projectVersion, http_prefix,
|
||||
project_version, http_prefix,
|
||||
fromNickname,
|
||||
fromDomain, postToBox,
|
||||
76536)
|
||||
|
@ -1129,7 +1129,7 @@ def getFollowingViaServer(base_dir: str, session,
|
|||
domain: str, port: int,
|
||||
http_prefix: str, pageNumber: int,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Gets a page from the following collection as json
|
||||
"""
|
||||
|
@ -1170,7 +1170,7 @@ def getFollowersViaServer(base_dir: str, session,
|
|||
domain: str, port: int,
|
||||
http_prefix: str, pageNumber: int,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Gets a page from the followers collection as json
|
||||
"""
|
||||
|
@ -1211,7 +1211,7 @@ def getFollowRequestsViaServer(base_dir: str, session,
|
|||
domain: str, port: int,
|
||||
http_prefix: str, pageNumber: int,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Gets a page from the follow requests collection as json
|
||||
"""
|
||||
|
@ -1252,7 +1252,7 @@ def approveFollowRequestViaServer(base_dir: str, session,
|
|||
domain: str, port: int,
|
||||
http_prefix: str, approveHandle: int,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> str:
|
||||
"""Approves a follow request
|
||||
This is not exactly via c2s though. It simulates pressing the Approve
|
||||
|
@ -1293,7 +1293,7 @@ def denyFollowRequestViaServer(base_dir: str, session,
|
|||
domain: str, port: int,
|
||||
http_prefix: str, denyHandle: int,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> str:
|
||||
"""Denies a follow request
|
||||
This is not exactly via c2s though. It simulates pressing the Deny
|
||||
|
|
16
inbox.py
16
inbox.py
|
@ -3661,7 +3661,7 @@ def _restoreQueueItems(base_dir: str, queue: []) -> None:
|
|||
print('Restored ' + str(len(queue)) + ' inbox queue items')
|
||||
|
||||
|
||||
def runInboxQueueWatchdog(projectVersion: str, httpd) -> None:
|
||||
def runInboxQueueWatchdog(project_version: str, httpd) -> None:
|
||||
"""This tries to keep the inbox thread running even if it dies
|
||||
"""
|
||||
print('Starting inbox queue watchdog')
|
||||
|
@ -3847,7 +3847,7 @@ def _receiveFollowRequest(session, base_dir: str, http_prefix: str,
|
|||
port: int, sendThreads: [], postLog: [],
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
messageJson: {}, federationList: [],
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
max_followers: int, onionDomain: str,
|
||||
signingPrivateKeyPem: str, unitTest: bool) -> bool:
|
||||
"""Receives a follow request within the POST section of HTTPServer
|
||||
|
@ -3967,7 +3967,7 @@ def _receiveFollowRequest(session, base_dir: str, http_prefix: str,
|
|||
if debug:
|
||||
print('Obtaining the following actor: ' + messageJson['actor'])
|
||||
if not getPersonPubKey(base_dir, session, messageJson['actor'],
|
||||
personCache, debug, projectVersion,
|
||||
personCache, debug, project_version,
|
||||
http_prefix, domainToFollow, onionDomain,
|
||||
signingPrivateKeyPem):
|
||||
if debug:
|
||||
|
@ -4004,7 +4004,7 @@ def _receiveFollowRequest(session, base_dir: str, http_prefix: str,
|
|||
if debug:
|
||||
print('Obtaining the following actor: ' + messageJson['actor'])
|
||||
if not getPersonPubKey(base_dir, session, messageJson['actor'],
|
||||
personCache, debug, projectVersion,
|
||||
personCache, debug, project_version,
|
||||
http_prefix, domainToFollow, onionDomain,
|
||||
signingPrivateKeyPem):
|
||||
if debug:
|
||||
|
@ -4054,12 +4054,12 @@ def _receiveFollowRequest(session, base_dir: str, http_prefix: str,
|
|||
messageJson['actor'], federationList,
|
||||
messageJson, sendThreads, postLog,
|
||||
cachedWebfingers, personCache,
|
||||
debug, projectVersion, True,
|
||||
debug, project_version, True,
|
||||
signingPrivateKeyPem)
|
||||
|
||||
|
||||
def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
|
||||
projectVersion: str,
|
||||
project_version: str,
|
||||
base_dir: str, http_prefix: str,
|
||||
sendThreads: [], postLog: [],
|
||||
cachedWebfingers: {}, personCache: {}, queue: [],
|
||||
|
@ -4232,7 +4232,7 @@ def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
|
|||
pubKey = \
|
||||
getPersonPubKey(base_dir, session, keyId,
|
||||
personCache, debug,
|
||||
projectVersion, http_prefix,
|
||||
project_version, http_prefix,
|
||||
domain, onionDomain, signingPrivateKeyPem)
|
||||
if pubKey:
|
||||
if debug:
|
||||
|
@ -4370,7 +4370,7 @@ def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
|
|||
personCache,
|
||||
queueJson['post'],
|
||||
federationList,
|
||||
debug, projectVersion,
|
||||
debug, project_version,
|
||||
max_followers, onionDomain,
|
||||
signingPrivateKeyPem, unitTest):
|
||||
if os.path.isfile(queueFilename):
|
||||
|
|
20
like.py
20
like.py
|
@ -76,7 +76,7 @@ def _like(recentPostsCache: {},
|
|||
clientToServer: bool,
|
||||
sendThreads: [], postLog: [],
|
||||
personCache: {}, cachedWebfingers: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates a like
|
||||
actor is the person doing the liking
|
||||
|
@ -137,7 +137,7 @@ def _like(recentPostsCache: {},
|
|||
'https://www.w3.org/ns/activitystreams#Public',
|
||||
http_prefix, True, clientToServer, federationList,
|
||||
sendThreads, postLog, cachedWebfingers, personCache,
|
||||
debug, projectVersion, None, groupAccount,
|
||||
debug, project_version, None, groupAccount,
|
||||
signingPrivateKeyPem, 7367374)
|
||||
|
||||
return newLikeJson
|
||||
|
@ -151,7 +151,7 @@ def likePost(recentPostsCache: {},
|
|||
likeStatusNumber: int, clientToServer: bool,
|
||||
sendThreads: [], postLog: [],
|
||||
personCache: {}, cachedWebfingers: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Likes a given status post. This is only used by unit tests
|
||||
"""
|
||||
|
@ -164,7 +164,7 @@ def likePost(recentPostsCache: {},
|
|||
session, base_dir, federationList, nickname, domain, port,
|
||||
ccList, http_prefix, objectUrl, actorLiked, clientToServer,
|
||||
sendThreads, postLog, personCache, cachedWebfingers,
|
||||
debug, projectVersion, signingPrivateKeyPem)
|
||||
debug, project_version, signingPrivateKeyPem)
|
||||
|
||||
|
||||
def sendLikeViaServer(base_dir: str, session,
|
||||
|
@ -172,7 +172,7 @@ def sendLikeViaServer(base_dir: str, session,
|
|||
fromDomain: str, fromPort: int,
|
||||
http_prefix: str, likeUrl: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates a like via c2s
|
||||
"""
|
||||
|
@ -196,7 +196,7 @@ def sendLikeViaServer(base_dir: str, session,
|
|||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
fromDomain, projectVersion, debug, False,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
if debug:
|
||||
|
@ -216,7 +216,7 @@ def sendLikeViaServer(base_dir: str, session,
|
|||
originDomain,
|
||||
base_dir, session, wfRequest,
|
||||
personCache,
|
||||
projectVersion, http_prefix,
|
||||
project_version, http_prefix,
|
||||
fromNickname, fromDomain,
|
||||
postToBox, 72873)
|
||||
|
||||
|
@ -255,7 +255,7 @@ def sendUndoLikeViaServer(base_dir: str, session,
|
|||
fromDomain: str, fromPort: int,
|
||||
http_prefix: str, likeUrl: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Undo a like via c2s
|
||||
"""
|
||||
|
@ -283,7 +283,7 @@ def sendUndoLikeViaServer(base_dir: str, session,
|
|||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
fromDomain, projectVersion, debug, False,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
if debug:
|
||||
|
@ -303,7 +303,7 @@ def sendUndoLikeViaServer(base_dir: str, session,
|
|||
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||
originDomain,
|
||||
base_dir, session, wfRequest,
|
||||
personCache, projectVersion,
|
||||
personCache, project_version,
|
||||
http_prefix, fromNickname,
|
||||
fromDomain, postToBox,
|
||||
72625)
|
||||
|
|
|
@ -27,7 +27,7 @@ def manualDenyFollowRequest(session, base_dir: str,
|
|||
sendThreads: [], postLog: [],
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool,
|
||||
projectVersion: str,
|
||||
project_version: str,
|
||||
signingPrivateKeyPem: str) -> None:
|
||||
"""Manually deny a follow request
|
||||
"""
|
||||
|
@ -65,7 +65,7 @@ def manualDenyFollowRequest(session, base_dir: str,
|
|||
federationList,
|
||||
sendThreads, postLog,
|
||||
cachedWebfingers, personCache,
|
||||
debug, projectVersion,
|
||||
debug, project_version,
|
||||
signingPrivateKeyPem)
|
||||
|
||||
print('Follow request from ' + denyHandle + ' was denied.')
|
||||
|
@ -79,7 +79,7 @@ def manualDenyFollowRequestThread(session, base_dir: str,
|
|||
sendThreads: [], postLog: [],
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool,
|
||||
projectVersion: str,
|
||||
project_version: str,
|
||||
signingPrivateKeyPem: str) -> None:
|
||||
"""Manually deny a follow request, within a thread so that the
|
||||
user interface doesn't lag
|
||||
|
@ -94,7 +94,7 @@ def manualDenyFollowRequestThread(session, base_dir: str,
|
|||
sendThreads, postLog,
|
||||
cachedWebfingers, personCache,
|
||||
debug,
|
||||
projectVersion,
|
||||
project_version,
|
||||
signingPrivateKeyPem), daemon=True)
|
||||
thr.start()
|
||||
sendThreads.append(thr)
|
||||
|
@ -128,7 +128,7 @@ def manualApproveFollowRequest(session, base_dir: str,
|
|||
sendThreads: [], postLog: [],
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool,
|
||||
projectVersion: str,
|
||||
project_version: str,
|
||||
signingPrivateKeyPem: str) -> None:
|
||||
"""Manually approve a follow request
|
||||
"""
|
||||
|
@ -218,7 +218,7 @@ def manualApproveFollowRequest(session, base_dir: str,
|
|||
cachedWebfingers,
|
||||
personCache,
|
||||
debug,
|
||||
projectVersion, False,
|
||||
project_version, False,
|
||||
signingPrivateKeyPem)
|
||||
updateApprovedFollowers = True
|
||||
else:
|
||||
|
@ -285,7 +285,7 @@ def manualApproveFollowRequestThread(session, base_dir: str,
|
|||
sendThreads: [], postLog: [],
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool,
|
||||
projectVersion: str,
|
||||
project_version: str,
|
||||
signingPrivateKeyPem: str) -> None:
|
||||
"""Manually approve a follow request, in a thread so as not to cause
|
||||
the UI to lag
|
||||
|
@ -300,7 +300,7 @@ def manualApproveFollowRequestThread(session, base_dir: str,
|
|||
sendThreads, postLog,
|
||||
cachedWebfingers, personCache,
|
||||
debug,
|
||||
projectVersion,
|
||||
project_version,
|
||||
signingPrivateKeyPem), daemon=True)
|
||||
thr.start()
|
||||
sendThreads.append(thr)
|
||||
|
|
|
@ -91,7 +91,7 @@ def mastoApiV1Response(path: str, callingDomain: str,
|
|||
translate: {},
|
||||
registration: bool,
|
||||
systemLanguage: str,
|
||||
projectVersion: str,
|
||||
project_version: str,
|
||||
customEmoji: [],
|
||||
show_node_info_accounts: bool,
|
||||
broch_mode: bool) -> ({}, str):
|
||||
|
@ -230,7 +230,7 @@ def mastoApiV1Response(path: str, callingDomain: str,
|
|||
domainFull,
|
||||
registration,
|
||||
systemLanguage,
|
||||
projectVersion)
|
||||
project_version)
|
||||
sendJsonStr = 'masto API instance metadata sent ' + uaStr
|
||||
elif path.startswith('/api/v1/instance/peers'):
|
||||
# This is just a dummy result.
|
||||
|
|
|
@ -865,7 +865,7 @@ def runNewswireDaemon(base_dir: str, httpd,
|
|||
break
|
||||
|
||||
|
||||
def runNewswireWatchdog(projectVersion: str, httpd) -> None:
|
||||
def runNewswireWatchdog(project_version: str, httpd) -> None:
|
||||
"""This tries to keep the newswire update thread running even if it dies
|
||||
"""
|
||||
print('Starting newswire watchdog')
|
||||
|
|
136
posts.py
136
posts.py
|
@ -228,7 +228,7 @@ def getUserUrl(wfRequest: {}, sourceId: int, debug: bool) -> str:
|
|||
|
||||
def parseUserFeed(signingPrivateKeyPem: str,
|
||||
session, feedUrl: str, asHeader: {},
|
||||
projectVersion: str, http_prefix: str,
|
||||
project_version: str, http_prefix: str,
|
||||
originDomain: str, debug: bool, depth: int = 0) -> []:
|
||||
if depth > 10:
|
||||
if debug:
|
||||
|
@ -242,7 +242,7 @@ def parseUserFeed(signingPrivateKeyPem: str,
|
|||
print('originDomain ' + str(originDomain))
|
||||
|
||||
feedJson = getJson(signingPrivateKeyPem, session, feedUrl, asHeader, None,
|
||||
debug, projectVersion, http_prefix, originDomain)
|
||||
debug, project_version, http_prefix, originDomain)
|
||||
if not feedJson:
|
||||
profileStr = 'https://www.w3.org/ns/activitystreams'
|
||||
acceptStr = 'application/ld+json; profile="' + profileStr + '"'
|
||||
|
@ -251,7 +251,7 @@ def parseUserFeed(signingPrivateKeyPem: str,
|
|||
'Accept': acceptStr
|
||||
}
|
||||
feedJson = getJson(signingPrivateKeyPem, session, feedUrl,
|
||||
asHeader, None, debug, projectVersion,
|
||||
asHeader, None, debug, project_version,
|
||||
http_prefix, originDomain)
|
||||
if not feedJson:
|
||||
if debug:
|
||||
|
@ -282,7 +282,7 @@ def parseUserFeed(signingPrivateKeyPem: str,
|
|||
userFeed = \
|
||||
parseUserFeed(signingPrivateKeyPem,
|
||||
session, nextUrl, asHeader,
|
||||
projectVersion, http_prefix,
|
||||
project_version, http_prefix,
|
||||
originDomain, debug, depth + 1)
|
||||
if userFeed:
|
||||
return userFeed
|
||||
|
@ -297,7 +297,7 @@ def parseUserFeed(signingPrivateKeyPem: str,
|
|||
|
||||
def _getPersonBoxActor(session, base_dir: str, actor: str,
|
||||
profileStr: str, asHeader: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
http_prefix: str, originDomain: str,
|
||||
personCache: {},
|
||||
signingPrivateKeyPem: str,
|
||||
|
@ -314,14 +314,14 @@ def _getPersonBoxActor(session, base_dir: str, actor: str,
|
|||
'Accept': 'application/ld+json; profile="' + profileStr + '"'
|
||||
}
|
||||
personJson = getJson(signingPrivateKeyPem, session, actor, asHeader, None,
|
||||
debug, projectVersion, http_prefix, originDomain)
|
||||
debug, project_version, http_prefix, originDomain)
|
||||
if personJson:
|
||||
return personJson
|
||||
asHeader = {
|
||||
'Accept': 'application/ld+json; profile="' + profileStr + '"'
|
||||
}
|
||||
personJson = getJson(signingPrivateKeyPem, session, actor, asHeader, None,
|
||||
debug, projectVersion, http_prefix, originDomain)
|
||||
debug, project_version, http_prefix, originDomain)
|
||||
if personJson:
|
||||
return personJson
|
||||
print('Unable to get actor for ' + actor + ' ' + str(sourceId))
|
||||
|
@ -332,7 +332,7 @@ def _getPersonBoxActor(session, base_dir: str, actor: str,
|
|||
|
||||
def getPersonBox(signingPrivateKeyPem: str, originDomain: str,
|
||||
base_dir: str, session, wfRequest: {}, personCache: {},
|
||||
projectVersion: str, http_prefix: str,
|
||||
project_version: str, http_prefix: str,
|
||||
nickname: str, domain: str,
|
||||
boxName: str = 'inbox',
|
||||
sourceId=0) -> (str, str, str, str, str, str, str, bool):
|
||||
|
@ -367,7 +367,7 @@ def getPersonBox(signingPrivateKeyPem: str, originDomain: str,
|
|||
personJson = \
|
||||
_getPersonBoxActor(session, base_dir, personUrl,
|
||||
profileStr, asHeader,
|
||||
debug, projectVersion,
|
||||
debug, project_version,
|
||||
http_prefix, originDomain,
|
||||
personCache, signingPrivateKeyPem,
|
||||
sourceId)
|
||||
|
@ -529,7 +529,7 @@ def _getPosts(session, outboxUrl: str, maxPosts: int,
|
|||
federationList: [],
|
||||
personCache: {}, raw: bool,
|
||||
simple: bool, debug: bool,
|
||||
projectVersion: str, http_prefix: str,
|
||||
project_version: str, http_prefix: str,
|
||||
originDomain: str, systemLanguage: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Gets public posts from an outbox
|
||||
|
@ -560,7 +560,7 @@ def _getPosts(session, outboxUrl: str, maxPosts: int,
|
|||
i = 0
|
||||
userFeed = parseUserFeed(signingPrivateKeyPem,
|
||||
session, outboxUrl, asHeader,
|
||||
projectVersion, http_prefix,
|
||||
project_version, http_prefix,
|
||||
originDomain, debug)
|
||||
for item in userFeed:
|
||||
result.append(item)
|
||||
|
@ -574,7 +574,7 @@ def _getPosts(session, outboxUrl: str, maxPosts: int,
|
|||
print('Returning a human readable version of the feed')
|
||||
userFeed = parseUserFeed(signingPrivateKeyPem,
|
||||
session, outboxUrl, asHeader,
|
||||
projectVersion, http_prefix,
|
||||
project_version, http_prefix,
|
||||
originDomain, debug)
|
||||
if not userFeed:
|
||||
return personPosts
|
||||
|
@ -748,7 +748,7 @@ def getPostDomains(session, outboxUrl: str, maxPosts: int,
|
|||
federationList: [],
|
||||
personCache: {},
|
||||
debug: bool,
|
||||
projectVersion: str, http_prefix: str,
|
||||
project_version: str, http_prefix: str,
|
||||
domain: str,
|
||||
wordFrequency: {},
|
||||
domainList: [], systemLanguage: str,
|
||||
|
@ -777,7 +777,7 @@ def getPostDomains(session, outboxUrl: str, maxPosts: int,
|
|||
i = 0
|
||||
userFeed = parseUserFeed(signingPrivateKeyPem,
|
||||
session, outboxUrl, asHeader,
|
||||
projectVersion, http_prefix, domain, debug)
|
||||
project_version, http_prefix, domain, debug)
|
||||
for item in userFeed:
|
||||
i += 1
|
||||
if i > maxPosts:
|
||||
|
@ -815,7 +815,7 @@ def _getPostsForBlockedDomains(base_dir: str,
|
|||
federationList: [],
|
||||
personCache: {},
|
||||
debug: bool,
|
||||
projectVersion: str, http_prefix: str,
|
||||
project_version: str, http_prefix: str,
|
||||
domain: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Returns a dictionary of posts for blocked domains
|
||||
|
@ -842,7 +842,7 @@ def _getPostsForBlockedDomains(base_dir: str,
|
|||
i = 0
|
||||
userFeed = parseUserFeed(signingPrivateKeyPem,
|
||||
session, outboxUrl, asHeader,
|
||||
projectVersion, http_prefix, domain, debug)
|
||||
project_version, http_prefix, domain, debug)
|
||||
for item in userFeed:
|
||||
i += 1
|
||||
if i > maxPosts:
|
||||
|
@ -2263,7 +2263,7 @@ def threadSendPost(session, postJsonStr: str, federationList: [],
|
|||
tries += 1
|
||||
|
||||
|
||||
def sendPost(signingPrivateKeyPem: str, projectVersion: str,
|
||||
def sendPost(signingPrivateKeyPem: str, project_version: str,
|
||||
session, base_dir: str, nickname: str, domain: str, port: int,
|
||||
toNickname: str, toDomain: str, toPort: int, cc: str,
|
||||
http_prefix: str, content: str, followersOnly: bool,
|
||||
|
@ -2295,7 +2295,7 @@ def sendPost(signingPrivateKeyPem: str, projectVersion: str,
|
|||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
domain, projectVersion, debug, False,
|
||||
domain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
return 1
|
||||
|
@ -2318,7 +2318,7 @@ def sendPost(signingPrivateKeyPem: str, projectVersion: str,
|
|||
originDomain,
|
||||
base_dir, session, wfRequest,
|
||||
personCache,
|
||||
projectVersion, http_prefix,
|
||||
project_version, http_prefix,
|
||||
nickname, domain, postToBox,
|
||||
72533)
|
||||
|
||||
|
@ -2414,7 +2414,7 @@ def sendPost(signingPrivateKeyPem: str, projectVersion: str,
|
|||
return 0
|
||||
|
||||
|
||||
def sendPostViaServer(signingPrivateKeyPem: str, projectVersion: str,
|
||||
def sendPostViaServer(signingPrivateKeyPem: str, project_version: str,
|
||||
base_dir: str, session, fromNickname: str, password: str,
|
||||
fromDomain: str, fromPort: int,
|
||||
toNickname: str, toDomain: str, toPort: int, cc: str,
|
||||
|
@ -2444,7 +2444,7 @@ def sendPostViaServer(signingPrivateKeyPem: str, projectVersion: str,
|
|||
# lookup the inbox for the To handle
|
||||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix, cachedWebfingers,
|
||||
fromDomainFull, projectVersion, debug, False,
|
||||
fromDomainFull, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
if debug:
|
||||
|
@ -2466,7 +2466,7 @@ def sendPostViaServer(signingPrivateKeyPem: str, projectVersion: str,
|
|||
originDomain,
|
||||
base_dir, session, wfRequest,
|
||||
personCache,
|
||||
projectVersion, http_prefix,
|
||||
project_version, http_prefix,
|
||||
fromNickname,
|
||||
fromDomainFull, postToBox,
|
||||
82796)
|
||||
|
@ -2613,7 +2613,7 @@ def sendSignedJson(postJsonObject: {}, session, base_dir: str,
|
|||
http_prefix: str, saveToFile: bool, clientToServer: bool,
|
||||
federationList: [],
|
||||
sendThreads: [], postLog: [], cachedWebfingers: {},
|
||||
personCache: {}, debug: bool, projectVersion: str,
|
||||
personCache: {}, debug: bool, project_version: str,
|
||||
sharedItemsToken: str, groupAccount: bool,
|
||||
signingPrivateKeyPem: str,
|
||||
sourceId: int) -> int:
|
||||
|
@ -2652,7 +2652,7 @@ def sendSignedJson(postJsonObject: {}, session, base_dir: str,
|
|||
|
||||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix, cachedWebfingers,
|
||||
domain, projectVersion, debug, groupAccount,
|
||||
domain, project_version, debug, groupAccount,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
if debug:
|
||||
|
@ -2680,7 +2680,7 @@ def sendSignedJson(postJsonObject: {}, session, base_dir: str,
|
|||
originDomain,
|
||||
base_dir, session, wfRequest,
|
||||
personCache,
|
||||
projectVersion, http_prefix,
|
||||
project_version, http_prefix,
|
||||
nickname, domain, postToBox,
|
||||
sourceId)
|
||||
|
||||
|
@ -2863,7 +2863,7 @@ def _sendToNamedAddresses(session, base_dir: str,
|
|||
sendThreads: [], postLog: [],
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
postJsonObject: {}, debug: bool,
|
||||
projectVersion: str,
|
||||
project_version: str,
|
||||
shared_items_federated_domains: [],
|
||||
sharedItemFederationTokens: {},
|
||||
signingPrivateKeyPem: str) -> None:
|
||||
|
@ -3002,7 +3002,7 @@ def _sendToNamedAddresses(session, base_dir: str,
|
|||
cc, fromHttpPrefix, True, clientToServer,
|
||||
federationList,
|
||||
sendThreads, postLog, cachedWebfingers,
|
||||
personCache, debug, projectVersion,
|
||||
personCache, debug, project_version,
|
||||
sharedItemsToken, groupAccount,
|
||||
signingPrivateKeyPem, 34436782)
|
||||
|
||||
|
@ -3014,7 +3014,7 @@ def sendToNamedAddressesThread(session, base_dir: str,
|
|||
sendThreads: [], postLog: [],
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
postJsonObject: {}, debug: bool,
|
||||
projectVersion: str,
|
||||
project_version: str,
|
||||
shared_items_federated_domains: [],
|
||||
sharedItemFederationTokens: {},
|
||||
signingPrivateKeyPem: str):
|
||||
|
@ -3029,7 +3029,7 @@ def sendToNamedAddressesThread(session, base_dir: str,
|
|||
sendThreads, postLog,
|
||||
cachedWebfingers, personCache,
|
||||
postJsonObject, debug,
|
||||
projectVersion,
|
||||
project_version,
|
||||
shared_items_federated_domains,
|
||||
sharedItemFederationTokens,
|
||||
signingPrivateKeyPem), daemon=True)
|
||||
|
@ -3090,7 +3090,7 @@ def sendToFollowers(session, base_dir: str,
|
|||
sendThreads: [], postLog: [],
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
postJsonObject: {}, debug: bool,
|
||||
projectVersion: str,
|
||||
project_version: str,
|
||||
shared_items_federated_domains: [],
|
||||
sharedItemFederationTokens: {},
|
||||
signingPrivateKeyPem: str) -> None:
|
||||
|
@ -3212,7 +3212,7 @@ def sendToFollowers(session, base_dir: str,
|
|||
cc, fromHttpPrefix, True, clientToServer,
|
||||
federationList,
|
||||
sendThreads, postLog, cachedWebfingers,
|
||||
personCache, debug, projectVersion,
|
||||
personCache, debug, project_version,
|
||||
sharedItemsToken, groupAccount,
|
||||
signingPrivateKeyPem, 639342)
|
||||
else:
|
||||
|
@ -3241,7 +3241,7 @@ def sendToFollowers(session, base_dir: str,
|
|||
cc, fromHttpPrefix, True, clientToServer,
|
||||
federationList,
|
||||
sendThreads, postLog, cachedWebfingers,
|
||||
personCache, debug, projectVersion,
|
||||
personCache, debug, project_version,
|
||||
sharedItemsToken, groupAccount,
|
||||
signingPrivateKeyPem, 634219)
|
||||
|
||||
|
@ -3263,7 +3263,7 @@ def sendToFollowersThread(session, base_dir: str,
|
|||
sendThreads: [], postLog: [],
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
postJsonObject: {}, debug: bool,
|
||||
projectVersion: str,
|
||||
project_version: str,
|
||||
shared_items_federated_domains: [],
|
||||
sharedItemFederationTokens: {},
|
||||
signingPrivateKeyPem: str):
|
||||
|
@ -3278,7 +3278,7 @@ def sendToFollowersThread(session, base_dir: str,
|
|||
sendThreads, postLog,
|
||||
cachedWebfingers, personCache,
|
||||
postJsonObject.copy(), debug,
|
||||
projectVersion,
|
||||
project_version,
|
||||
shared_items_federated_domains,
|
||||
sharedItemFederationTokens,
|
||||
signingPrivateKeyPem), daemon=True)
|
||||
|
@ -4057,7 +4057,7 @@ def archivePostsForPerson(http_prefix: str, nickname: str, domain: str,
|
|||
def getPublicPostsOfPerson(base_dir: str, nickname: str, domain: str,
|
||||
raw: bool, simple: bool, proxyType: str,
|
||||
port: int, http_prefix: str,
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
systemLanguage: str,
|
||||
signingPrivateKeyPem: str,
|
||||
originDomain: str) -> None:
|
||||
|
@ -4087,7 +4087,7 @@ def getPublicPostsOfPerson(base_dir: str, nickname: str, domain: str,
|
|||
|
||||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix, cachedWebfingers,
|
||||
originDomain, projectVersion, debug, groupAccount,
|
||||
originDomain, project_version, debug, groupAccount,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
if debug:
|
||||
|
@ -4105,7 +4105,7 @@ def getPublicPostsOfPerson(base_dir: str, nickname: str, domain: str,
|
|||
originDomain,
|
||||
base_dir, session, wfRequest,
|
||||
personCache,
|
||||
projectVersion, http_prefix,
|
||||
project_version, http_prefix,
|
||||
nickname, domain, 'outbox',
|
||||
62524)
|
||||
if debug:
|
||||
|
@ -4119,14 +4119,14 @@ def getPublicPostsOfPerson(base_dir: str, nickname: str, domain: str,
|
|||
_getPosts(session, personUrl, 30, maxMentions, maxEmoji,
|
||||
maxAttachments, federationList,
|
||||
personCache, raw, simple, debug,
|
||||
projectVersion, http_prefix, originDomain, systemLanguage,
|
||||
project_version, http_prefix, originDomain, systemLanguage,
|
||||
signingPrivateKeyPem)
|
||||
|
||||
|
||||
def getPublicPostDomains(session, base_dir: str, nickname: str, domain: str,
|
||||
originDomain: str,
|
||||
proxyType: str, port: int, http_prefix: str,
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
wordFrequency: {}, domainList: [],
|
||||
systemLanguage: str,
|
||||
signingPrivateKeyPem: str) -> []:
|
||||
|
@ -4144,7 +4144,7 @@ def getPublicPostDomains(session, base_dir: str, nickname: str, domain: str,
|
|||
handle = http_prefix + "://" + domainFull + "/@" + nickname
|
||||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix, cachedWebfingers,
|
||||
domain, projectVersion, debug, False,
|
||||
domain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
return domainList
|
||||
|
@ -4158,7 +4158,7 @@ def getPublicPostDomains(session, base_dir: str, nickname: str, domain: str,
|
|||
originDomain,
|
||||
base_dir, session, wfRequest,
|
||||
personCache,
|
||||
projectVersion, http_prefix,
|
||||
project_version, http_prefix,
|
||||
nickname, domain, 'outbox',
|
||||
92522)
|
||||
maxMentions = 99
|
||||
|
@ -4168,7 +4168,7 @@ def getPublicPostDomains(session, base_dir: str, nickname: str, domain: str,
|
|||
getPostDomains(session, personUrl, 64, maxMentions, maxEmoji,
|
||||
maxAttachments, federationList,
|
||||
personCache, debug,
|
||||
projectVersion, http_prefix, domain,
|
||||
project_version, http_prefix, domain,
|
||||
wordFrequency, domainList, systemLanguage,
|
||||
signingPrivateKeyPem)
|
||||
postDomains.sort()
|
||||
|
@ -4223,7 +4223,7 @@ def downloadFollowCollection(signingPrivateKeyPem: str,
|
|||
def getPublicPostInfo(session, base_dir: str, nickname: str, domain: str,
|
||||
originDomain: str,
|
||||
proxyType: str, port: int, http_prefix: str,
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
wordFrequency: {}, systemLanguage: str,
|
||||
signingPrivateKeyPem: str) -> []:
|
||||
""" Returns a dict of domains referenced within public posts
|
||||
|
@ -4240,7 +4240,7 @@ def getPublicPostInfo(session, base_dir: str, nickname: str, domain: str,
|
|||
handle = http_prefix + "://" + domainFull + "/@" + nickname
|
||||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix, cachedWebfingers,
|
||||
domain, projectVersion, debug, False,
|
||||
domain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
return {}
|
||||
|
@ -4254,7 +4254,7 @@ def getPublicPostInfo(session, base_dir: str, nickname: str, domain: str,
|
|||
originDomain,
|
||||
base_dir, session, wfRequest,
|
||||
personCache,
|
||||
projectVersion, http_prefix,
|
||||
project_version, http_prefix,
|
||||
nickname, domain, 'outbox',
|
||||
13863)
|
||||
maxMentions = 99
|
||||
|
@ -4265,7 +4265,7 @@ def getPublicPostInfo(session, base_dir: str, nickname: str, domain: str,
|
|||
getPostDomains(session, personUrl, maxPosts, maxMentions, maxEmoji,
|
||||
maxAttachments, federationList,
|
||||
personCache, debug,
|
||||
projectVersion, http_prefix, domain,
|
||||
project_version, http_prefix, domain,
|
||||
wordFrequency, [], systemLanguage, signingPrivateKeyPem)
|
||||
postDomains.sort()
|
||||
domainsInfo = {}
|
||||
|
@ -4280,7 +4280,7 @@ def getPublicPostInfo(session, base_dir: str, nickname: str, domain: str,
|
|||
federationList,
|
||||
personCache,
|
||||
debug,
|
||||
projectVersion, http_prefix,
|
||||
project_version, http_prefix,
|
||||
domain, signingPrivateKeyPem)
|
||||
for blockedDomain, postUrlList in blockedPosts.items():
|
||||
domainsInfo[blockedDomain] += postUrlList
|
||||
|
@ -4291,7 +4291,7 @@ def getPublicPostInfo(session, base_dir: str, nickname: str, domain: str,
|
|||
def getPublicPostDomainsBlocked(session, base_dir: str,
|
||||
nickname: str, domain: str,
|
||||
proxyType: str, port: int, http_prefix: str,
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
wordFrequency: {}, domainList: [],
|
||||
systemLanguage: str,
|
||||
signingPrivateKeyPem: str) -> []:
|
||||
|
@ -4303,7 +4303,7 @@ def getPublicPostDomainsBlocked(session, base_dir: str,
|
|||
getPublicPostDomains(session, base_dir, nickname, domain,
|
||||
originDomain,
|
||||
proxyType, port, http_prefix,
|
||||
debug, projectVersion,
|
||||
debug, project_version,
|
||||
wordFrequency, domainList, systemLanguage,
|
||||
signingPrivateKeyPem)
|
||||
if not postDomains:
|
||||
|
@ -4352,7 +4352,7 @@ def _getNonMutualsOfPerson(base_dir: str,
|
|||
def checkDomains(session, base_dir: str,
|
||||
nickname: str, domain: str,
|
||||
proxyType: str, port: int, http_prefix: str,
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
maxBlockedDomains: int, singleCheck: bool,
|
||||
systemLanguage: str,
|
||||
signingPrivateKeyPem: str) -> None:
|
||||
|
@ -4382,7 +4382,7 @@ def checkDomains(session, base_dir: str,
|
|||
nonMutualNickname,
|
||||
nonMutualDomain,
|
||||
proxyType, port, http_prefix,
|
||||
debug, projectVersion,
|
||||
debug, project_version,
|
||||
wordFrequency, [],
|
||||
systemLanguage,
|
||||
signingPrivateKeyPem)
|
||||
|
@ -4404,7 +4404,7 @@ def checkDomains(session, base_dir: str,
|
|||
nonMutualNickname,
|
||||
nonMutualDomain,
|
||||
proxyType, port, http_prefix,
|
||||
debug, projectVersion,
|
||||
debug, project_version,
|
||||
wordFrequency, [],
|
||||
systemLanguage,
|
||||
signingPrivateKeyPem)
|
||||
|
@ -4502,7 +4502,7 @@ def _rejectAnnounce(announceFilename: str,
|
|||
|
||||
def downloadAnnounce(session, base_dir: str, http_prefix: str,
|
||||
nickname: str, domain: str,
|
||||
postJsonObject: {}, projectVersion: str,
|
||||
postJsonObject: {}, project_version: str,
|
||||
translate: {},
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
|
@ -4590,8 +4590,10 @@ def downloadAnnounce(session, base_dir: str, http_prefix: str,
|
|||
print('Downloading Announce content for ' +
|
||||
postJsonObject['object'])
|
||||
announcedJson = \
|
||||
getJson(signingPrivateKeyPem, session, postJsonObject['object'],
|
||||
asHeader, None, debug, projectVersion, http_prefix, domain)
|
||||
getJson(signingPrivateKeyPem, session,
|
||||
postJsonObject['object'],
|
||||
asHeader, None, debug, project_version,
|
||||
http_prefix, domain)
|
||||
|
||||
if not announcedJson:
|
||||
return None
|
||||
|
@ -4753,7 +4755,7 @@ def sendBlockViaServer(base_dir: str, session,
|
|||
fromDomain: str, fromPort: int,
|
||||
http_prefix: str, blockedUrl: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates a block via c2s
|
||||
"""
|
||||
|
@ -4781,7 +4783,7 @@ def sendBlockViaServer(base_dir: str, session,
|
|||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
fromDomain, projectVersion, debug, False,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
if debug:
|
||||
|
@ -4801,7 +4803,7 @@ def sendBlockViaServer(base_dir: str, session,
|
|||
originDomain,
|
||||
base_dir, session, wfRequest,
|
||||
personCache,
|
||||
projectVersion, http_prefix, fromNickname,
|
||||
project_version, http_prefix, fromNickname,
|
||||
fromDomain, postToBox, 72652)
|
||||
|
||||
if not inboxUrl:
|
||||
|
@ -4837,7 +4839,7 @@ def sendMuteViaServer(base_dir: str, session,
|
|||
fromDomain: str, fromPort: int,
|
||||
http_prefix: str, mutedUrl: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates a mute via c2s
|
||||
"""
|
||||
|
@ -4861,7 +4863,7 @@ def sendMuteViaServer(base_dir: str, session,
|
|||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
fromDomain, projectVersion, debug, False,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
if debug:
|
||||
|
@ -4881,7 +4883,7 @@ def sendMuteViaServer(base_dir: str, session,
|
|||
originDomain,
|
||||
base_dir, session, wfRequest,
|
||||
personCache,
|
||||
projectVersion, http_prefix, fromNickname,
|
||||
project_version, http_prefix, fromNickname,
|
||||
fromDomain, postToBox, 72652)
|
||||
|
||||
if not inboxUrl:
|
||||
|
@ -4917,7 +4919,7 @@ def sendUndoMuteViaServer(base_dir: str, session,
|
|||
fromDomain: str, fromPort: int,
|
||||
http_prefix: str, mutedUrl: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Undoes a mute via c2s
|
||||
"""
|
||||
|
@ -4946,7 +4948,7 @@ def sendUndoMuteViaServer(base_dir: str, session,
|
|||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
fromDomain, projectVersion, debug, False,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
if debug:
|
||||
|
@ -4966,7 +4968,7 @@ def sendUndoMuteViaServer(base_dir: str, session,
|
|||
originDomain,
|
||||
base_dir, session, wfRequest,
|
||||
personCache,
|
||||
projectVersion, http_prefix, fromNickname,
|
||||
project_version, http_prefix, fromNickname,
|
||||
fromDomain, postToBox, 72652)
|
||||
|
||||
if not inboxUrl:
|
||||
|
@ -5003,7 +5005,7 @@ def sendUndoBlockViaServer(base_dir: str, session,
|
|||
fromDomain: str, fromPort: int,
|
||||
http_prefix: str, blockedUrl: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates a block via c2s
|
||||
"""
|
||||
|
@ -5035,7 +5037,7 @@ def sendUndoBlockViaServer(base_dir: str, session,
|
|||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
fromDomain, projectVersion, debug, False,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
if debug:
|
||||
|
@ -5054,7 +5056,7 @@ def sendUndoBlockViaServer(base_dir: str, session,
|
|||
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||
originDomain,
|
||||
base_dir, session, wfRequest, personCache,
|
||||
projectVersion, http_prefix, fromNickname,
|
||||
project_version, http_prefix, fromNickname,
|
||||
fromDomain, postToBox, 53892)
|
||||
|
||||
if not inboxUrl:
|
||||
|
|
20
reaction.py
20
reaction.py
|
@ -69,7 +69,7 @@ def _reaction(recentPostsCache: {},
|
|||
clientToServer: bool,
|
||||
sendThreads: [], postLog: [],
|
||||
personCache: {}, cachedWebfingers: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates an emoji reaction
|
||||
actor is the person doing the reacting
|
||||
|
@ -139,7 +139,7 @@ def _reaction(recentPostsCache: {},
|
|||
'https://www.w3.org/ns/activitystreams#Public',
|
||||
http_prefix, True, clientToServer, federationList,
|
||||
sendThreads, postLog, cachedWebfingers, personCache,
|
||||
debug, projectVersion, None, groupAccount,
|
||||
debug, project_version, None, groupAccount,
|
||||
signingPrivateKeyPem, 7165392)
|
||||
|
||||
return newReactionJson
|
||||
|
@ -154,7 +154,7 @@ def reactionPost(recentPostsCache: {},
|
|||
clientToServer: bool,
|
||||
sendThreads: [], postLog: [],
|
||||
personCache: {}, cachedWebfingers: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Adds a reaction to a given status post. This is only used by unit tests
|
||||
"""
|
||||
|
@ -170,7 +170,7 @@ def reactionPost(recentPostsCache: {},
|
|||
ccList, http_prefix, objectUrl, emojiContent,
|
||||
actorReaction, clientToServer,
|
||||
sendThreads, postLog, personCache, cachedWebfingers,
|
||||
debug, projectVersion, signingPrivateKeyPem)
|
||||
debug, project_version, signingPrivateKeyPem)
|
||||
|
||||
|
||||
def sendReactionViaServer(base_dir: str, session,
|
||||
|
@ -179,7 +179,7 @@ def sendReactionViaServer(base_dir: str, session,
|
|||
http_prefix: str, reactionUrl: str,
|
||||
emojiContent: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates a reaction via c2s
|
||||
"""
|
||||
|
@ -208,7 +208,7 @@ def sendReactionViaServer(base_dir: str, session,
|
|||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
fromDomain, projectVersion, debug, False,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
if debug:
|
||||
|
@ -228,7 +228,7 @@ def sendReactionViaServer(base_dir: str, session,
|
|||
originDomain,
|
||||
base_dir, session, wfRequest,
|
||||
personCache,
|
||||
projectVersion, http_prefix,
|
||||
project_version, http_prefix,
|
||||
fromNickname, fromDomain,
|
||||
postToBox, 72873)
|
||||
|
||||
|
@ -269,7 +269,7 @@ def sendUndoReactionViaServer(base_dir: str, session,
|
|||
http_prefix: str, reactionUrl: str,
|
||||
emojiContent: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Undo a reaction via c2s
|
||||
"""
|
||||
|
@ -298,7 +298,7 @@ def sendUndoReactionViaServer(base_dir: str, session,
|
|||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
fromDomain, projectVersion, debug, False,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
if debug:
|
||||
|
@ -318,7 +318,7 @@ def sendUndoReactionViaServer(base_dir: str, session,
|
|||
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||
originDomain,
|
||||
base_dir, session, wfRequest,
|
||||
personCache, projectVersion,
|
||||
personCache, project_version,
|
||||
http_prefix, fromNickname,
|
||||
fromDomain, postToBox,
|
||||
72625)
|
||||
|
|
|
@ -112,7 +112,7 @@ def _updatePostSchedule(base_dir: str, handle: str, httpd,
|
|||
httpd.personCache,
|
||||
httpd.allowDeletion,
|
||||
httpd.proxyType,
|
||||
httpd.projectVersion,
|
||||
httpd.project_version,
|
||||
httpd.debug,
|
||||
httpd.yt_replace_domain,
|
||||
httpd.twitterReplacementDomain,
|
||||
|
@ -179,7 +179,7 @@ def runPostSchedule(base_dir: str, httpd, maxScheduledPosts: int):
|
|||
break
|
||||
|
||||
|
||||
def runPostScheduleWatchdog(projectVersion: str, httpd) -> None:
|
||||
def runPostScheduleWatchdog(project_version: str, httpd) -> None:
|
||||
"""This tries to keep the scheduled post thread running even if it dies
|
||||
"""
|
||||
print('Starting scheduled post watchdog')
|
||||
|
|
26
shares.py
26
shares.py
|
@ -559,7 +559,7 @@ def sendShareViaServer(base_dir, session,
|
|||
itemQty: float, itemType: str, itemCategory: str,
|
||||
location: str, duration: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
itemPrice: str, itemCurrency: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates an item share via c2s
|
||||
|
@ -611,7 +611,7 @@ def sendShareViaServer(base_dir, session,
|
|||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
fromDomain, projectVersion, debug, False,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
if debug:
|
||||
|
@ -630,7 +630,7 @@ def sendShareViaServer(base_dir, session,
|
|||
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||
originDomain,
|
||||
base_dir, session, wfRequest,
|
||||
personCache, projectVersion,
|
||||
personCache, project_version,
|
||||
http_prefix, fromNickname,
|
||||
fromDomain, postToBox,
|
||||
83653)
|
||||
|
@ -681,7 +681,7 @@ def sendUndoShareViaServer(base_dir: str, session,
|
|||
fromDomain: str, fromPort: int,
|
||||
http_prefix: str, displayName: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Undoes a share via c2s
|
||||
"""
|
||||
|
@ -715,7 +715,7 @@ def sendUndoShareViaServer(base_dir: str, session,
|
|||
# lookup the inbox for the To handle
|
||||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix, cachedWebfingers,
|
||||
fromDomain, projectVersion, debug, False,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
if debug:
|
||||
|
@ -734,7 +734,7 @@ def sendUndoShareViaServer(base_dir: str, session,
|
|||
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||
originDomain,
|
||||
base_dir, session, wfRequest,
|
||||
personCache, projectVersion,
|
||||
personCache, project_version,
|
||||
http_prefix, fromNickname,
|
||||
fromDomain, postToBox,
|
||||
12663)
|
||||
|
@ -779,7 +779,7 @@ def sendWantedViaServer(base_dir, session,
|
|||
itemQty: float, itemType: str, itemCategory: str,
|
||||
location: str, duration: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
itemMaxPrice: str, itemCurrency: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates a wanted item via c2s
|
||||
|
@ -831,7 +831,7 @@ def sendWantedViaServer(base_dir, session,
|
|||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
fromDomain, projectVersion, debug, False,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
if debug:
|
||||
|
@ -850,7 +850,7 @@ def sendWantedViaServer(base_dir, session,
|
|||
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||
originDomain,
|
||||
base_dir, session, wfRequest,
|
||||
personCache, projectVersion,
|
||||
personCache, project_version,
|
||||
http_prefix, fromNickname,
|
||||
fromDomain, postToBox,
|
||||
23653)
|
||||
|
@ -901,7 +901,7 @@ def sendUndoWantedViaServer(base_dir: str, session,
|
|||
fromDomain: str, fromPort: int,
|
||||
http_prefix: str, displayName: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Undoes a wanted item via c2s
|
||||
"""
|
||||
|
@ -935,7 +935,7 @@ def sendUndoWantedViaServer(base_dir: str, session,
|
|||
# lookup the inbox for the To handle
|
||||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix, cachedWebfingers,
|
||||
fromDomain, projectVersion, debug, False,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
if debug:
|
||||
|
@ -954,7 +954,7 @@ def sendUndoWantedViaServer(base_dir: str, session,
|
|||
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||
originDomain,
|
||||
base_dir, session, wfRequest,
|
||||
personCache, projectVersion,
|
||||
personCache, project_version,
|
||||
http_prefix, fromNickname,
|
||||
fromDomain, postToBox,
|
||||
12693)
|
||||
|
@ -1602,7 +1602,7 @@ def _updateFederatedSharesCache(session, shared_items_federated_domains: [],
|
|||
time.sleep(2)
|
||||
|
||||
|
||||
def runFederatedSharesWatchdog(projectVersion: str, httpd) -> None:
|
||||
def runFederatedSharesWatchdog(project_version: str, httpd) -> None:
|
||||
"""This tries to keep the federated shares update thread
|
||||
running even if it dies
|
||||
"""
|
||||
|
|
|
@ -177,7 +177,7 @@ def sendSkillViaServer(base_dir: str, session, nickname: str, password: str,
|
|||
http_prefix: str,
|
||||
skill: str, skillLevelPercent: int,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Sets a skill for a person via c2s
|
||||
"""
|
||||
|
@ -210,7 +210,7 @@ def sendSkillViaServer(base_dir: str, session, nickname: str, password: str,
|
|||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
domain, projectVersion, debug, False,
|
||||
domain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
if debug:
|
||||
|
@ -229,7 +229,7 @@ def sendSkillViaServer(base_dir: str, session, nickname: str, password: str,
|
|||
displayName, _) = getPersonBox(signingPrivateKeyPem,
|
||||
originDomain,
|
||||
base_dir, session, wfRequest,
|
||||
personCache, projectVersion,
|
||||
personCache, project_version,
|
||||
http_prefix, nickname, domain,
|
||||
postToBox, 76121)
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ from utils import getFullDomain
|
|||
def instancesGraph(base_dir: str, handles: str,
|
||||
proxyType: str,
|
||||
port: int, http_prefix: str,
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
systemLanguage: str, signingPrivateKeyPem: str) -> str:
|
||||
""" Returns a dot graph of federating instances
|
||||
based upon a few sample handles.
|
||||
|
@ -54,7 +54,7 @@ def instancesGraph(base_dir: str, handles: str,
|
|||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
domain, projectVersion, debug, False,
|
||||
domain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
return dotGraphStr + '}\n'
|
||||
|
@ -69,7 +69,7 @@ def instancesGraph(base_dir: str, handles: str,
|
|||
originDomain,
|
||||
base_dir, session, wfRequest,
|
||||
personCache,
|
||||
projectVersion, http_prefix,
|
||||
project_version, http_prefix,
|
||||
nickname, domain, 'outbox',
|
||||
27261)
|
||||
wordFrequency = {}
|
||||
|
@ -77,7 +77,7 @@ def instancesGraph(base_dir: str, handles: str,
|
|||
getPostDomains(session, personUrl, 64, maxMentions, maxEmoji,
|
||||
maxAttachments, federationList,
|
||||
personCache, debug,
|
||||
projectVersion, http_prefix, domain,
|
||||
project_version, http_prefix, domain,
|
||||
wordFrequency, [], systemLanguage,
|
||||
signingPrivateKeyPem)
|
||||
postDomains.sort()
|
||||
|
|
|
@ -27,7 +27,7 @@ def htmlConfirmDelete(cssCache: {},
|
|||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate, pageNumber: int,
|
||||
session, base_dir: str, messageId: str,
|
||||
http_prefix: str, projectVersion: str,
|
||||
http_prefix: str, project_version: str,
|
||||
cachedWebfingers: {}, personCache: {},
|
||||
callingDomain: str,
|
||||
yt_replace_domain: str,
|
||||
|
@ -71,7 +71,7 @@ def htmlConfirmDelete(cssCache: {},
|
|||
base_dir, session, cachedWebfingers, personCache,
|
||||
nickname, domain, port, postJsonObject,
|
||||
None, True, False,
|
||||
http_prefix, projectVersion, 'outbox',
|
||||
http_prefix, project_version, 'outbox',
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
show_published_date_only,
|
||||
|
|
|
@ -201,7 +201,7 @@ def htmlNewPost(cssCache: {}, media_instance: bool, translate: {},
|
|||
session, cachedWebfingers: {},
|
||||
personCache: {}, port: int,
|
||||
postJsonObject: {},
|
||||
projectVersion: str,
|
||||
project_version: str,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
show_published_date_only: bool,
|
||||
|
@ -269,7 +269,7 @@ def htmlNewPost(cssCache: {}, media_instance: bool, translate: {},
|
|||
nickname, domain, port,
|
||||
postJsonObject,
|
||||
None, True, False,
|
||||
http_prefix, projectVersion,
|
||||
http_prefix, project_version,
|
||||
boxName,
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
|
|
|
@ -27,7 +27,7 @@ def _htmlFrontScreenPosts(recentPostsCache: {}, max_recent_posts: int,
|
|||
base_dir: str, http_prefix: str,
|
||||
nickname: str, domain: str, port: int,
|
||||
session, cachedWebfingers: {}, personCache: {},
|
||||
projectVersion: str,
|
||||
project_version: str,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
show_published_date_only: bool,
|
||||
|
@ -73,7 +73,7 @@ def _htmlFrontScreenPosts(recentPostsCache: {}, max_recent_posts: int,
|
|||
personCache,
|
||||
nickname, domain, port, item,
|
||||
None, True, False,
|
||||
http_prefix, projectVersion, 'inbox',
|
||||
http_prefix, project_version, 'inbox',
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
show_published_date_only,
|
||||
|
@ -98,7 +98,7 @@ def htmlFrontScreen(signingPrivateKeyPem: str,
|
|||
cssCache: {}, icons_as_buttons: bool,
|
||||
defaultTimeline: str,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, projectVersion: str,
|
||||
translate: {}, project_version: str,
|
||||
base_dir: str, http_prefix: str, authorized: bool,
|
||||
profileJson: {}, selected: str,
|
||||
session, cachedWebfingers: {}, personCache: {},
|
||||
|
@ -178,7 +178,7 @@ def htmlFrontScreen(signingPrivateKeyPem: str,
|
|||
base_dir, http_prefix,
|
||||
nickname, domain, port,
|
||||
session, cachedWebfingers, personCache,
|
||||
projectVersion,
|
||||
project_version,
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
show_published_date_only,
|
||||
|
|
|
@ -36,7 +36,7 @@ def htmlModeration(cssCache: {}, defaultTimeline: str,
|
|||
session, base_dir: str, wfRequest: {}, personCache: {},
|
||||
nickname: str, domain: str, port: int, inboxJson: {},
|
||||
allowDeletion: bool,
|
||||
http_prefix: str, projectVersion: str,
|
||||
http_prefix: str, project_version: str,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
show_published_date_only: bool,
|
||||
|
@ -66,7 +66,7 @@ def htmlModeration(cssCache: {}, defaultTimeline: str,
|
|||
wfRequest, personCache,
|
||||
nickname, domain, port, inboxJson, 'moderation',
|
||||
allowDeletion, http_prefix,
|
||||
projectVersion, True, False,
|
||||
project_version, True, False,
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
show_published_date_only,
|
||||
|
|
|
@ -1329,7 +1329,7 @@ def individualPostAsHtml(signingPrivateKeyPem: str,
|
|||
postJsonObject: {},
|
||||
avatarUrl: str, showAvatarOptions: bool,
|
||||
allowDeletion: bool,
|
||||
http_prefix: str, projectVersion: str,
|
||||
http_prefix: str, project_version: str,
|
||||
boxName: str,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
|
@ -1444,7 +1444,7 @@ def individualPostAsHtml(signingPrivateKeyPem: str,
|
|||
base_dir, session,
|
||||
postActorWf,
|
||||
personCache,
|
||||
projectVersion,
|
||||
project_version,
|
||||
http_prefix,
|
||||
nickname, domain,
|
||||
'outbox', 72367)
|
||||
|
@ -1498,7 +1498,7 @@ def individualPostAsHtml(signingPrivateKeyPem: str,
|
|||
postJsonAnnounce = \
|
||||
downloadAnnounce(session, base_dir, http_prefix,
|
||||
nickname, domain, postJsonObject,
|
||||
projectVersion, translate,
|
||||
project_version, translate,
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
allow_local_network_access,
|
||||
|
@ -1997,7 +1997,7 @@ def htmlIndividualPost(cssCache: {},
|
|||
personCache: {},
|
||||
nickname: str, domain: str, port: int, authorized: bool,
|
||||
postJsonObject: {}, http_prefix: str,
|
||||
projectVersion: str, likedBy: str,
|
||||
project_version: str, likedBy: str,
|
||||
reactBy: str, reactEmoji: str,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
|
@ -2063,7 +2063,7 @@ def htmlIndividualPost(cssCache: {},
|
|||
base_dir, session, cachedWebfingers, personCache,
|
||||
nickname, domain, port, postJsonObject,
|
||||
None, True, False,
|
||||
http_prefix, projectVersion, 'inbox',
|
||||
http_prefix, project_version, 'inbox',
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
show_published_date_only,
|
||||
|
@ -2094,7 +2094,7 @@ def htmlIndividualPost(cssCache: {},
|
|||
nickname, domain, port,
|
||||
postJsonObject,
|
||||
None, True, False,
|
||||
http_prefix, projectVersion, 'inbox',
|
||||
http_prefix, project_version, 'inbox',
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
show_published_date_only,
|
||||
|
@ -2129,7 +2129,7 @@ def htmlIndividualPost(cssCache: {},
|
|||
personCache,
|
||||
nickname, domain, port, item,
|
||||
None, True, False,
|
||||
http_prefix, projectVersion, 'inbox',
|
||||
http_prefix, project_version, 'inbox',
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
show_published_date_only,
|
||||
|
@ -2157,7 +2157,7 @@ def htmlPostReplies(cssCache: {},
|
|||
translate: {}, base_dir: str,
|
||||
session, cachedWebfingers: {}, personCache: {},
|
||||
nickname: str, domain: str, port: int, repliesJson: {},
|
||||
http_prefix: str, projectVersion: str,
|
||||
http_prefix: str, project_version: str,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
show_published_date_only: bool,
|
||||
|
@ -2181,7 +2181,7 @@ def htmlPostReplies(cssCache: {},
|
|||
personCache,
|
||||
nickname, domain, port, item,
|
||||
None, True, False,
|
||||
http_prefix, projectVersion, 'inbox',
|
||||
http_prefix, project_version, 'inbox',
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
show_published_date_only,
|
||||
|
@ -2210,7 +2210,7 @@ def htmlEmojiReactionPicker(cssCache: {},
|
|||
personCache: {},
|
||||
nickname: str, domain: str, port: int,
|
||||
postJsonObject: {}, http_prefix: str,
|
||||
projectVersion: str,
|
||||
project_version: str,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
show_published_date_only: bool,
|
||||
|
@ -2233,7 +2233,7 @@ def htmlEmojiReactionPicker(cssCache: {},
|
|||
personCache,
|
||||
nickname, domain, port, postJsonObject,
|
||||
None, True, False,
|
||||
http_prefix, projectVersion, 'inbox',
|
||||
http_prefix, project_version, 'inbox',
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
show_published_date_only,
|
||||
|
|
|
@ -128,7 +128,7 @@ def htmlProfileAfterSearch(cssCache: {},
|
|||
nickname: str, domain: str, port: int,
|
||||
profileHandle: str,
|
||||
session, cachedWebfingers: {}, personCache: {},
|
||||
debug: bool, projectVersion: str,
|
||||
debug: bool, project_version: str,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
show_published_date_only: bool,
|
||||
|
@ -322,7 +322,7 @@ def htmlProfileAfterSearch(cssCache: {},
|
|||
|
||||
userFeed = \
|
||||
parseUserFeed(signingPrivateKeyPem,
|
||||
session, outboxUrl, asHeader, projectVersion,
|
||||
session, outboxUrl, asHeader, project_version,
|
||||
http_prefix, domain, debug)
|
||||
if userFeed:
|
||||
i = 0
|
||||
|
@ -339,7 +339,7 @@ def htmlProfileAfterSearch(cssCache: {},
|
|||
session, cachedWebfingers, personCache,
|
||||
nickname, domain, port,
|
||||
postJsonObject, avatarUrl, False, False,
|
||||
http_prefix, projectVersion, 'inbox',
|
||||
http_prefix, project_version, 'inbox',
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
show_published_date_only,
|
||||
|
@ -543,7 +543,7 @@ def htmlProfile(signingPrivateKeyPem: str,
|
|||
cssCache: {}, icons_as_buttons: bool,
|
||||
defaultTimeline: str,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, projectVersion: str,
|
||||
translate: {}, project_version: str,
|
||||
base_dir: str, http_prefix: str, authorized: bool,
|
||||
profileJson: {}, selected: str,
|
||||
session, cachedWebfingers: {}, personCache: {},
|
||||
|
@ -572,7 +572,7 @@ def htmlProfile(signingPrivateKeyPem: str,
|
|||
cssCache, icons_as_buttons,
|
||||
defaultTimeline,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, projectVersion,
|
||||
translate, project_version,
|
||||
base_dir, http_prefix, authorized,
|
||||
profileJson, selected,
|
||||
session, cachedWebfingers, personCache,
|
||||
|
@ -957,7 +957,7 @@ def htmlProfile(signingPrivateKeyPem: str,
|
|||
base_dir, http_prefix, authorized,
|
||||
nickname, domain, port,
|
||||
session, cachedWebfingers, personCache,
|
||||
projectVersion,
|
||||
project_version,
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
show_published_date_only,
|
||||
|
@ -974,7 +974,7 @@ def htmlProfile(signingPrivateKeyPem: str,
|
|||
authorized, nickname,
|
||||
domain, port, session,
|
||||
cachedWebfingers, personCache, extraJson,
|
||||
projectVersion, ["unfollow"], selected,
|
||||
project_version, ["unfollow"], selected,
|
||||
usersPath, pageNumber, maxItemsPerPage,
|
||||
dormant_months, debug,
|
||||
signingPrivateKeyPem)
|
||||
|
@ -984,7 +984,7 @@ def htmlProfile(signingPrivateKeyPem: str,
|
|||
authorized, nickname,
|
||||
domain, port, session,
|
||||
cachedWebfingers, personCache, extraJson,
|
||||
projectVersion, ["block"],
|
||||
project_version, ["block"],
|
||||
selected, usersPath, pageNumber,
|
||||
maxItemsPerPage, dormant_months, debug,
|
||||
signingPrivateKeyPem)
|
||||
|
@ -1025,7 +1025,7 @@ def _htmlProfilePosts(recentPostsCache: {}, max_recent_posts: int,
|
|||
authorized: bool,
|
||||
nickname: str, domain: str, port: int,
|
||||
session, cachedWebfingers: {}, personCache: {},
|
||||
projectVersion: str,
|
||||
project_version: str,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
show_published_date_only: bool,
|
||||
|
@ -1070,7 +1070,7 @@ def _htmlProfilePosts(recentPostsCache: {}, max_recent_posts: int,
|
|||
personCache,
|
||||
nickname, domain, port, item,
|
||||
None, True, False,
|
||||
http_prefix, projectVersion, 'inbox',
|
||||
http_prefix, project_version, 'inbox',
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
show_published_date_only,
|
||||
|
@ -1094,7 +1094,7 @@ def _htmlProfileFollowing(translate: {}, base_dir: str, http_prefix: str,
|
|||
authorized: bool,
|
||||
nickname: str, domain: str, port: int,
|
||||
session, cachedWebfingers: {}, personCache: {},
|
||||
followingJson: {}, projectVersion: str,
|
||||
followingJson: {}, project_version: str,
|
||||
buttons: [],
|
||||
feedName: str, actor: str,
|
||||
pageNumber: int,
|
||||
|
@ -1132,7 +1132,7 @@ def _htmlProfileFollowing(translate: {}, base_dir: str, http_prefix: str,
|
|||
cachedWebfingers, personCache,
|
||||
domain, followingActor,
|
||||
authorized, nickname,
|
||||
http_prefix, projectVersion, dormant,
|
||||
http_prefix, project_version, dormant,
|
||||
debug, buttons)
|
||||
|
||||
if authorized and maxItemsPerPage and pageNumber:
|
||||
|
@ -2341,7 +2341,7 @@ def _individualFollowAsHtml(signingPrivateKeyPem: str,
|
|||
authorized: bool,
|
||||
actorNickname: str,
|
||||
http_prefix: str,
|
||||
projectVersion: str,
|
||||
project_version: str,
|
||||
dormant: bool,
|
||||
debug: bool,
|
||||
buttons=[]) -> str:
|
||||
|
@ -2372,7 +2372,7 @@ def _individualFollowAsHtml(signingPrivateKeyPem: str,
|
|||
originDomain,
|
||||
base_dir, session,
|
||||
followUrlWf,
|
||||
personCache, projectVersion,
|
||||
personCache, project_version,
|
||||
http_prefix, followUrlNickname,
|
||||
domain, 'outbox', 43036)
|
||||
if avatarUrl2:
|
||||
|
|
|
@ -590,7 +590,7 @@ def htmlHistorySearch(cssCache: {}, translate: {}, base_dir: str,
|
|||
nickname: str, domain: str,
|
||||
historysearch: str,
|
||||
postsPerPage: int, pageNumber: int,
|
||||
projectVersion: str,
|
||||
project_version: str,
|
||||
recentPostsCache: {},
|
||||
max_recent_posts: int,
|
||||
session,
|
||||
|
@ -682,7 +682,7 @@ def htmlHistorySearch(cssCache: {}, translate: {}, base_dir: str,
|
|||
nickname, domain, port,
|
||||
postJsonObject,
|
||||
None, True, allowDeletion,
|
||||
http_prefix, projectVersion,
|
||||
http_prefix, project_version,
|
||||
'search',
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
|
@ -709,7 +709,7 @@ def htmlHashtagSearch(cssCache: {},
|
|||
base_dir: str, hashtag: str, pageNumber: int,
|
||||
postsPerPage: int,
|
||||
session, cachedWebfingers: {}, personCache: {},
|
||||
http_prefix: str, projectVersion: str,
|
||||
http_prefix: str, project_version: str,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
show_published_date_only: bool,
|
||||
|
@ -865,7 +865,7 @@ def htmlHashtagSearch(cssCache: {},
|
|||
postJsonObject,
|
||||
avatarUrl, showAvatarOptions,
|
||||
allowDeletion,
|
||||
http_prefix, projectVersion,
|
||||
http_prefix, project_version,
|
||||
'search',
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
|
@ -902,7 +902,7 @@ def rssHashtagSearch(nickname: str, domain: str, port: int,
|
|||
base_dir: str, hashtag: str,
|
||||
postsPerPage: int,
|
||||
session, cachedWebfingers: {}, personCache: {},
|
||||
http_prefix: str, projectVersion: str,
|
||||
http_prefix: str, project_version: str,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
systemLanguage: str) -> str:
|
||||
|
|
|
@ -425,7 +425,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
|||
cachedWebfingers: {}, personCache: {},
|
||||
nickname: str, domain: str, port: int, timelineJson: {},
|
||||
boxName: str, allowDeletion: bool,
|
||||
http_prefix: str, projectVersion: str,
|
||||
http_prefix: str, project_version: str,
|
||||
manuallyApproveFollowers: bool,
|
||||
minimal: bool,
|
||||
yt_replace_domain: str,
|
||||
|
@ -904,7 +904,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
|||
nickname, domain, port,
|
||||
item, None, True,
|
||||
allowDeletion,
|
||||
http_prefix, projectVersion,
|
||||
http_prefix, project_version,
|
||||
boxName,
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
|
@ -1125,7 +1125,7 @@ def htmlShares(cssCache: {}, defaultTimeline: str,
|
|||
cachedWebfingers: {}, personCache: {},
|
||||
nickname: str, domain: str, port: int,
|
||||
allowDeletion: bool,
|
||||
http_prefix: str, projectVersion: str,
|
||||
http_prefix: str, project_version: str,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
show_published_date_only: bool,
|
||||
|
@ -1157,7 +1157,7 @@ def htmlShares(cssCache: {}, defaultTimeline: str,
|
|||
cachedWebfingers, personCache,
|
||||
nickname, domain, port, None,
|
||||
'tlshares', allowDeletion,
|
||||
http_prefix, projectVersion,
|
||||
http_prefix, project_version,
|
||||
manuallyApproveFollowers,
|
||||
False,
|
||||
yt_replace_domain,
|
||||
|
@ -1183,7 +1183,7 @@ def htmlWanted(cssCache: {}, defaultTimeline: str,
|
|||
cachedWebfingers: {}, personCache: {},
|
||||
nickname: str, domain: str, port: int,
|
||||
allowDeletion: bool,
|
||||
http_prefix: str, projectVersion: str,
|
||||
http_prefix: str, project_version: str,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
show_published_date_only: bool,
|
||||
|
@ -1215,7 +1215,7 @@ def htmlWanted(cssCache: {}, defaultTimeline: str,
|
|||
cachedWebfingers, personCache,
|
||||
nickname, domain, port, None,
|
||||
'tlwanted', allowDeletion,
|
||||
http_prefix, projectVersion,
|
||||
http_prefix, project_version,
|
||||
manuallyApproveFollowers,
|
||||
False,
|
||||
yt_replace_domain,
|
||||
|
@ -1241,7 +1241,7 @@ def htmlInbox(cssCache: {}, defaultTimeline: str,
|
|||
cachedWebfingers: {}, personCache: {},
|
||||
nickname: str, domain: str, port: int, inboxJson: {},
|
||||
allowDeletion: bool,
|
||||
http_prefix: str, projectVersion: str,
|
||||
http_prefix: str, project_version: str,
|
||||
minimal: bool,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
|
@ -1274,7 +1274,7 @@ def htmlInbox(cssCache: {}, defaultTimeline: str,
|
|||
cachedWebfingers, personCache,
|
||||
nickname, domain, port, inboxJson,
|
||||
'inbox', allowDeletion,
|
||||
http_prefix, projectVersion,
|
||||
http_prefix, project_version,
|
||||
manuallyApproveFollowers,
|
||||
minimal,
|
||||
yt_replace_domain,
|
||||
|
@ -1300,7 +1300,7 @@ def htmlBookmarks(cssCache: {}, defaultTimeline: str,
|
|||
cachedWebfingers: {}, personCache: {},
|
||||
nickname: str, domain: str, port: int, bookmarksJson: {},
|
||||
allowDeletion: bool,
|
||||
http_prefix: str, projectVersion: str,
|
||||
http_prefix: str, project_version: str,
|
||||
minimal: bool,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
|
@ -1333,7 +1333,7 @@ def htmlBookmarks(cssCache: {}, defaultTimeline: str,
|
|||
cachedWebfingers, personCache,
|
||||
nickname, domain, port, bookmarksJson,
|
||||
'tlbookmarks', allowDeletion,
|
||||
http_prefix, projectVersion,
|
||||
http_prefix, project_version,
|
||||
manuallyApproveFollowers,
|
||||
minimal,
|
||||
yt_replace_domain,
|
||||
|
@ -1358,7 +1358,7 @@ def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
|
|||
cachedWebfingers: {}, personCache: {},
|
||||
nickname: str, domain: str, port: int, inboxJson: {},
|
||||
allowDeletion: bool,
|
||||
http_prefix: str, projectVersion: str,
|
||||
http_prefix: str, project_version: str,
|
||||
minimal: bool,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
|
@ -1387,7 +1387,7 @@ def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
|
|||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, personCache,
|
||||
nickname, domain, port, inboxJson, 'dm', allowDeletion,
|
||||
http_prefix, projectVersion, False, minimal,
|
||||
http_prefix, project_version, False, minimal,
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
show_published_date_only,
|
||||
|
@ -1410,7 +1410,7 @@ def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
|
|||
cachedWebfingers: {}, personCache: {},
|
||||
nickname: str, domain: str, port: int, inboxJson: {},
|
||||
allowDeletion: bool,
|
||||
http_prefix: str, projectVersion: str,
|
||||
http_prefix: str, project_version: str,
|
||||
minimal: bool,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
|
@ -1439,7 +1439,7 @@ def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
|
|||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, personCache,
|
||||
nickname, domain, port, inboxJson, 'tlreplies',
|
||||
allowDeletion, http_prefix, projectVersion, False,
|
||||
allowDeletion, http_prefix, project_version, False,
|
||||
minimal,
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
|
@ -1463,7 +1463,7 @@ def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
|
|||
cachedWebfingers: {}, personCache: {},
|
||||
nickname: str, domain: str, port: int, inboxJson: {},
|
||||
allowDeletion: bool,
|
||||
http_prefix: str, projectVersion: str,
|
||||
http_prefix: str, project_version: str,
|
||||
minimal: bool,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
|
@ -1492,7 +1492,7 @@ def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
|
|||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, personCache,
|
||||
nickname, domain, port, inboxJson, 'tlmedia',
|
||||
allowDeletion, http_prefix, projectVersion, False,
|
||||
allowDeletion, http_prefix, project_version, False,
|
||||
minimal,
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
|
@ -1516,7 +1516,7 @@ def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
|
|||
cachedWebfingers: {}, personCache: {},
|
||||
nickname: str, domain: str, port: int, inboxJson: {},
|
||||
allowDeletion: bool,
|
||||
http_prefix: str, projectVersion: str,
|
||||
http_prefix: str, project_version: str,
|
||||
minimal: bool,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
|
@ -1545,7 +1545,7 @@ def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
|
|||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, personCache,
|
||||
nickname, domain, port, inboxJson, 'tlblogs',
|
||||
allowDeletion, http_prefix, projectVersion, False,
|
||||
allowDeletion, http_prefix, project_version, False,
|
||||
minimal,
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
|
@ -1569,7 +1569,7 @@ def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
|
|||
cachedWebfingers: {}, personCache: {},
|
||||
nickname: str, domain: str, port: int, inboxJson: {},
|
||||
allowDeletion: bool,
|
||||
http_prefix: str, projectVersion: str,
|
||||
http_prefix: str, project_version: str,
|
||||
minimal: bool,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
|
@ -1598,7 +1598,7 @@ def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
|
|||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, personCache,
|
||||
nickname, domain, port, inboxJson, 'tlfeatures',
|
||||
allowDeletion, http_prefix, projectVersion, False,
|
||||
allowDeletion, http_prefix, project_version, False,
|
||||
minimal,
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
|
@ -1622,7 +1622,7 @@ def htmlInboxNews(cssCache: {}, defaultTimeline: str,
|
|||
cachedWebfingers: {}, personCache: {},
|
||||
nickname: str, domain: str, port: int, inboxJson: {},
|
||||
allowDeletion: bool,
|
||||
http_prefix: str, projectVersion: str,
|
||||
http_prefix: str, project_version: str,
|
||||
minimal: bool,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
|
@ -1650,7 +1650,7 @@ def htmlInboxNews(cssCache: {}, defaultTimeline: str,
|
|||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, personCache,
|
||||
nickname, domain, port, inboxJson, 'tlnews',
|
||||
allowDeletion, http_prefix, projectVersion, False,
|
||||
allowDeletion, http_prefix, project_version, False,
|
||||
minimal,
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
|
@ -1674,7 +1674,7 @@ def htmlOutbox(cssCache: {}, defaultTimeline: str,
|
|||
cachedWebfingers: {}, personCache: {},
|
||||
nickname: str, domain: str, port: int, outboxJson: {},
|
||||
allowDeletion: bool,
|
||||
http_prefix: str, projectVersion: str,
|
||||
http_prefix: str, project_version: str,
|
||||
minimal: bool,
|
||||
yt_replace_domain: str,
|
||||
twitterReplacementDomain: str,
|
||||
|
@ -1705,7 +1705,7 @@ def htmlOutbox(cssCache: {}, defaultTimeline: str,
|
|||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, personCache,
|
||||
nickname, domain, port, outboxJson, 'outbox',
|
||||
allowDeletion, http_prefix, projectVersion,
|
||||
allowDeletion, http_prefix, project_version,
|
||||
manuallyApproveFollowers, minimal,
|
||||
yt_replace_domain,
|
||||
twitterReplacementDomain,
|
||||
|
|
|
@ -62,7 +62,7 @@ def _parseHandle(handle: str) -> (str, str, bool):
|
|||
|
||||
def webfingerHandle(session, handle: str, http_prefix: str,
|
||||
cachedWebfingers: {},
|
||||
fromDomain: str, projectVersion: str,
|
||||
fromDomain: str, project_version: str,
|
||||
debug: bool, groupAccount: bool,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Gets webfinger result for the given ActivityPub handle
|
||||
|
@ -93,7 +93,7 @@ def webfingerHandle(session, handle: str, http_prefix: str,
|
|||
try:
|
||||
result = \
|
||||
getJson(signingPrivateKeyPem, session, url, hdr, par,
|
||||
debug, projectVersion, http_prefix, fromDomain)
|
||||
debug, project_version, http_prefix, fromDomain)
|
||||
except Exception as ex:
|
||||
print('ERROR: webfingerHandle ' + str(ex))
|
||||
return None
|
||||
|
|
Loading…
Reference in New Issue