mirror of https://gitlab.com/bashrc2/epicyon
Snake case
parent
8a3d87d4a8
commit
58e396e483
|
@ -183,7 +183,7 @@ def _acceptFollow(base_dir: str, domain: str, messageJson: {},
|
|||
|
||||
def receiveAcceptReject(session, base_dir: str,
|
||||
http_prefix: str, domain: str, port: int,
|
||||
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||
send_threads: [], postLog: [], cached_webfingers: {},
|
||||
person_cache: {}, messageJson: {}, federationList: [],
|
||||
debug: bool) -> bool:
|
||||
"""Receives an Accept or Reject within the POST section of HTTPServer
|
||||
|
|
16
announce.py
16
announce.py
|
@ -121,7 +121,7 @@ def createAnnounce(session, base_dir: str, federationList: [],
|
|||
objectUrl: str, saveToFile: bool,
|
||||
client_to_server: bool,
|
||||
send_threads: [], postLog: [],
|
||||
person_cache: {}, cachedWebfingers: {},
|
||||
person_cache: {}, cached_webfingers: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates an announce message
|
||||
|
@ -179,7 +179,7 @@ def createAnnounce(session, base_dir: str, federationList: [],
|
|||
nickname, domain, port,
|
||||
announceNickname, announceDomain, announcePort, None,
|
||||
http_prefix, True, client_to_server, federationList,
|
||||
send_threads, postLog, cachedWebfingers, person_cache,
|
||||
send_threads, postLog, cached_webfingers, person_cache,
|
||||
debug, project_version, None, groupAccount,
|
||||
signingPrivateKeyPem, 639633)
|
||||
|
||||
|
@ -190,7 +190,7 @@ def announcePublic(session, base_dir: str, federationList: [],
|
|||
nickname: str, domain: str, port: int, http_prefix: str,
|
||||
objectUrl: str, client_to_server: bool,
|
||||
send_threads: [], postLog: [],
|
||||
person_cache: {}, cachedWebfingers: {},
|
||||
person_cache: {}, cached_webfingers: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Makes a public announcement
|
||||
|
@ -204,7 +204,7 @@ def announcePublic(session, base_dir: str, federationList: [],
|
|||
toUrl, ccUrl, http_prefix,
|
||||
objectUrl, True, client_to_server,
|
||||
send_threads, postLog,
|
||||
person_cache, cachedWebfingers,
|
||||
person_cache, cached_webfingers,
|
||||
debug, project_version,
|
||||
signingPrivateKeyPem)
|
||||
|
||||
|
@ -213,7 +213,7 @@ def sendAnnounceViaServer(base_dir: str, session,
|
|||
fromNickname: str, password: str,
|
||||
fromDomain: str, fromPort: int,
|
||||
http_prefix: str, repeatObjectUrl: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates an announce message via c2s
|
||||
|
@ -246,7 +246,7 @@ def sendAnnounceViaServer(base_dir: str, session,
|
|||
|
||||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
@ -306,7 +306,7 @@ def sendUndoAnnounceViaServer(base_dir: str, session,
|
|||
nickname: str, password: str,
|
||||
domain: str, port: int,
|
||||
http_prefix: str, repeatObjectUrl: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Undo an announce message via c2s
|
||||
|
@ -331,7 +331,7 @@ def sendUndoAnnounceViaServer(base_dir: str, session,
|
|||
|
||||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
domain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
|
|
@ -81,7 +81,7 @@ def sendAvailabilityViaServer(base_dir: str, session,
|
|||
domain: str, port: int,
|
||||
http_prefix: str,
|
||||
status: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Sets the availability for a person via c2s
|
||||
|
@ -107,7 +107,7 @@ def sendAvailabilityViaServer(base_dir: str, session,
|
|||
|
||||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
domain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
|
12
bookmarks.py
12
bookmarks.py
|
@ -255,7 +255,7 @@ def bookmark(recentPostsCache: {},
|
|||
objectUrl: str, actorBookmarked: str,
|
||||
client_to_server: bool,
|
||||
send_threads: [], postLog: [],
|
||||
person_cache: {}, cachedWebfingers: {},
|
||||
person_cache: {}, cached_webfingers: {},
|
||||
debug: bool, project_version: str) -> {}:
|
||||
"""Creates a bookmark
|
||||
actor is the person doing the bookmarking
|
||||
|
@ -314,7 +314,7 @@ def undoBookmark(recentPostsCache: {},
|
|||
objectUrl: str, actorBookmarked: str,
|
||||
client_to_server: bool,
|
||||
send_threads: [], postLog: [],
|
||||
person_cache: {}, cachedWebfingers: {},
|
||||
person_cache: {}, cached_webfingers: {},
|
||||
debug: bool, project_version: str) -> {}:
|
||||
"""Removes a bookmark
|
||||
actor is the person doing the bookmarking
|
||||
|
@ -374,7 +374,7 @@ def sendBookmarkViaServer(base_dir: str, session,
|
|||
nickname: str, password: str,
|
||||
domain: str, fromPort: int,
|
||||
http_prefix: str, bookmarkUrl: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates a bookmark via c2s
|
||||
|
@ -404,7 +404,7 @@ def sendBookmarkViaServer(base_dir: str, session,
|
|||
|
||||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
domain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
@ -464,7 +464,7 @@ def sendUndoBookmarkViaServer(base_dir: str, session,
|
|||
nickname: str, password: str,
|
||||
domain: str, fromPort: int,
|
||||
http_prefix: str, bookmarkUrl: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Removes a bookmark via c2s
|
||||
|
@ -494,7 +494,7 @@ def sendUndoBookmarkViaServer(base_dir: str, session,
|
|||
|
||||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
domain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
|
10
cache.py
10
cache.py
|
@ -122,17 +122,17 @@ def expirePersonCache(person_cache: {}):
|
|||
print(str(len(removals)) + ' actors were expired from the cache')
|
||||
|
||||
|
||||
def storeWebfingerInCache(handle: str, wf, cachedWebfingers: {}) -> None:
|
||||
def storeWebfingerInCache(handle: str, wf, cached_webfingers: {}) -> None:
|
||||
"""Store a webfinger endpoint in the cache
|
||||
"""
|
||||
cachedWebfingers[handle] = wf
|
||||
cached_webfingers[handle] = wf
|
||||
|
||||
|
||||
def getWebfingerFromCache(handle: str, cachedWebfingers: {}) -> {}:
|
||||
def getWebfingerFromCache(handle: str, cached_webfingers: {}) -> {}:
|
||||
"""Get webfinger endpoint from the cache
|
||||
"""
|
||||
if cachedWebfingers.get(handle):
|
||||
return cachedWebfingers[handle]
|
||||
if cached_webfingers.get(handle):
|
||||
return cached_webfingers[handle]
|
||||
return None
|
||||
|
||||
|
||||
|
|
118
daemon.py
118
daemon.py
|
@ -1288,7 +1288,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.federationList,
|
||||
self.server.send_threads,
|
||||
self.server.postLog,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
self.server.allow_deletion,
|
||||
self.server.proxy_type, version,
|
||||
|
@ -2717,7 +2717,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.recentPostsCache,
|
||||
self.server.max_recent_posts,
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
self.server.port,
|
||||
None,
|
||||
|
@ -2851,7 +2851,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.recentPostsCache,
|
||||
self.server.max_recent_posts,
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
self.server.port,
|
||||
None,
|
||||
|
@ -3049,7 +3049,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
False, self.server.federationList,
|
||||
self.server.send_threads,
|
||||
self.server.postLog,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache, debug,
|
||||
self.server.project_version,
|
||||
self.server.signingPrivateKeyPem)
|
||||
|
@ -3301,7 +3301,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
searchStr[1:], 1,
|
||||
maxPostsInHashtagFeed,
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
http_prefix,
|
||||
self.server.project_version,
|
||||
|
@ -3397,7 +3397,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.recentPostsCache,
|
||||
self.server.max_recent_posts,
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
port,
|
||||
self.server.yt_replace_domain,
|
||||
|
@ -3465,7 +3465,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.recentPostsCache,
|
||||
self.server.max_recent_posts,
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
port,
|
||||
self.server.yt_replace_domain,
|
||||
|
@ -3562,7 +3562,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
port,
|
||||
searchStr,
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
self.server.debug,
|
||||
self.server.project_version,
|
||||
|
@ -6496,7 +6496,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
webfingerUpdate(base_dir,
|
||||
nickname, domain,
|
||||
onion_domain,
|
||||
self.server.cachedWebfingers)
|
||||
self.server.cached_webfingers)
|
||||
# also copy to the actors cache and
|
||||
# person_cache in memory
|
||||
storePersonInCache(base_dir,
|
||||
|
@ -7541,7 +7541,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.translate,
|
||||
base_dir, hashtag, pageNumber,
|
||||
maxPostsInHashtagFeed, self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
http_prefix,
|
||||
self.server.project_version,
|
||||
|
@ -7604,7 +7604,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.translate,
|
||||
base_dir, hashtag,
|
||||
maxPostsInFeed, self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
http_prefix,
|
||||
self.server.project_version,
|
||||
|
@ -7699,7 +7699,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.send_threads,
|
||||
self.server.postLog,
|
||||
self.server.person_cache,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
debug,
|
||||
self.server.project_version,
|
||||
self.server.signingPrivateKeyPem)
|
||||
|
@ -7750,7 +7750,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.translate,
|
||||
pageNumber, base_dir,
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
self.postToNickname, domain,
|
||||
self.server.port, announceJson,
|
||||
|
@ -7912,7 +7912,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.federationList,
|
||||
self.server.send_threads,
|
||||
self.server.postLog,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
debug,
|
||||
self.server.project_version,
|
||||
|
@ -8067,7 +8067,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.federationList,
|
||||
self.server.send_threads,
|
||||
self.server.postLog,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
debug,
|
||||
self.server.project_version,
|
||||
|
@ -8209,7 +8209,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.translate,
|
||||
pageNumber, base_dir,
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
self.postToNickname, domain,
|
||||
self.server.port, likedPostJson,
|
||||
|
@ -8364,7 +8364,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.translate,
|
||||
pageNumber, base_dir,
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
self.postToNickname, domain,
|
||||
self.server.port, likedPostJson,
|
||||
|
@ -8547,7 +8547,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.translate,
|
||||
pageNumber, base_dir,
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
self.postToNickname, domain,
|
||||
self.server.port, reactionPostJson,
|
||||
|
@ -8720,7 +8720,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.translate,
|
||||
pageNumber, base_dir,
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
self.postToNickname, domain,
|
||||
self.server.port, reactionPostJson,
|
||||
|
@ -8820,7 +8820,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.translate,
|
||||
self.server.base_dir,
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
self.postToNickname,
|
||||
domain, port, post_json_object,
|
||||
|
@ -8910,7 +8910,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.send_threads,
|
||||
self.server.postLog,
|
||||
self.server.person_cache,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.debug,
|
||||
self.server.project_version)
|
||||
# clear the icon from the cache so that it gets updated
|
||||
|
@ -8940,7 +8940,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.translate,
|
||||
pageNumber, base_dir,
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
self.postToNickname, domain,
|
||||
self.server.port, bookmarkPostJson,
|
||||
|
@ -9036,7 +9036,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.send_threads,
|
||||
self.server.postLog,
|
||||
self.server.person_cache,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
debug,
|
||||
self.server.project_version)
|
||||
# clear the icon from the cache so that it gets updated
|
||||
|
@ -9068,7 +9068,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.translate,
|
||||
pageNumber, base_dir,
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
self.postToNickname, domain,
|
||||
self.server.port, bookmarkPostJson,
|
||||
|
@ -9171,7 +9171,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.session, base_dir,
|
||||
deleteUrl, http_prefix,
|
||||
self.server.project_version,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache, callingDomain,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitter_replacement_domain,
|
||||
|
@ -9270,7 +9270,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.translate,
|
||||
pageNumber, base_dir,
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
nickname, domain,
|
||||
self.server.port, mutePostJson,
|
||||
|
@ -9380,7 +9380,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.translate,
|
||||
pageNumber, base_dir,
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
nickname, domain,
|
||||
self.server.port, mutePostJson,
|
||||
|
@ -9488,7 +9488,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
max_recent_posts = self.server.max_recent_posts
|
||||
translate = self.server.translate
|
||||
session = self.server.session
|
||||
cachedWebfingers = self.server.cachedWebfingers
|
||||
cached_webfingers = self.server.cached_webfingers
|
||||
person_cache = self.server.person_cache
|
||||
project_version = self.server.project_version
|
||||
ytDomain = self.server.yt_replace_domain
|
||||
|
@ -9502,7 +9502,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
translate,
|
||||
base_dir,
|
||||
session,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
nickname,
|
||||
domain,
|
||||
|
@ -9580,7 +9580,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
max_recent_posts = self.server.max_recent_posts
|
||||
translate = self.server.translate
|
||||
session = self.server.session
|
||||
cachedWebfingers = self.server.cachedWebfingers
|
||||
cached_webfingers = self.server.cached_webfingers
|
||||
person_cache = self.server.person_cache
|
||||
project_version = self.server.project_version
|
||||
ytDomain = self.server.yt_replace_domain
|
||||
|
@ -9594,7 +9594,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
translate,
|
||||
base_dir,
|
||||
session,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
nickname,
|
||||
domain,
|
||||
|
@ -9673,8 +9673,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.defaultTimeline
|
||||
recentPostsCache = \
|
||||
self.server.recentPostsCache
|
||||
cachedWebfingers = \
|
||||
self.server.cachedWebfingers
|
||||
cached_webfingers = \
|
||||
self.server.cached_webfingers
|
||||
yt_replace_domain = \
|
||||
self.server.yt_replace_domain
|
||||
twitter_replacement_domain = \
|
||||
|
@ -9703,7 +9703,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
base_dir, http_prefix, True,
|
||||
getPerson, 'roles',
|
||||
self.server.session,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
self.server.person_cache,
|
||||
yt_replace_domain,
|
||||
twitter_replacement_domain,
|
||||
|
@ -9778,8 +9778,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.defaultTimeline
|
||||
recentPostsCache = \
|
||||
self.server.recentPostsCache
|
||||
cachedWebfingers = \
|
||||
self.server.cachedWebfingers
|
||||
cached_webfingers = \
|
||||
self.server.cached_webfingers
|
||||
yt_replace_domain = \
|
||||
self.server.yt_replace_domain
|
||||
twitter_replacement_domain = \
|
||||
|
@ -9819,7 +9819,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
base_dir, http_prefix, True,
|
||||
getPerson, 'skills',
|
||||
self.server.session,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
self.server.person_cache,
|
||||
yt_replace_domain,
|
||||
twitter_replacement_domain,
|
||||
|
@ -9984,7 +9984,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.translate,
|
||||
base_dir,
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
nickname, domain, port,
|
||||
authorized,
|
||||
|
@ -10157,7 +10157,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
defaultTimeline: str,
|
||||
max_recent_posts: int,
|
||||
translate: {},
|
||||
cachedWebfingers: {},
|
||||
cached_webfingers: {},
|
||||
person_cache: {},
|
||||
allow_deletion: bool,
|
||||
project_version: str,
|
||||
|
@ -10236,7 +10236,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
pageNumber, maxPostsInFeed,
|
||||
session,
|
||||
base_dir,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
nickname,
|
||||
domain,
|
||||
|
@ -10389,7 +10389,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
pageNumber, maxPostsInFeed,
|
||||
self.server.session,
|
||||
base_dir,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
nickname,
|
||||
domain,
|
||||
|
@ -10534,7 +10534,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
pageNumber, maxPostsInFeed,
|
||||
self.server.session,
|
||||
base_dir,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
nickname,
|
||||
domain,
|
||||
|
@ -10675,7 +10675,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
pageNumber, maxPostsInMediaFeed,
|
||||
self.server.session,
|
||||
base_dir,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
nickname,
|
||||
domain,
|
||||
|
@ -10817,7 +10817,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
pageNumber, maxPostsInBlogsFeed,
|
||||
self.server.session,
|
||||
base_dir,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
nickname,
|
||||
domain,
|
||||
|
@ -10968,7 +10968,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
pageNumber, maxPostsInNewsFeed,
|
||||
self.server.session,
|
||||
base_dir,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
nickname,
|
||||
domain,
|
||||
|
@ -11120,7 +11120,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
pageNumber, maxPostsInBlogsFeed,
|
||||
self.server.session,
|
||||
base_dir,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
nickname,
|
||||
domain,
|
||||
|
@ -11231,7 +11231,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
pageNumber, maxPostsInFeed,
|
||||
self.server.session,
|
||||
base_dir,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
nickname,
|
||||
domain,
|
||||
|
@ -11316,7 +11316,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
pageNumber, maxPostsInFeed,
|
||||
self.server.session,
|
||||
base_dir,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
nickname,
|
||||
domain,
|
||||
|
@ -11438,7 +11438,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
pageNumber, maxPostsInFeed,
|
||||
self.server.session,
|
||||
base_dir,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
nickname,
|
||||
domain,
|
||||
|
@ -11578,7 +11578,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
pageNumber, maxPostsInFeed,
|
||||
self.server.session,
|
||||
base_dir,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
nickname, domain, port,
|
||||
outboxFeed,
|
||||
|
@ -11711,7 +11711,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
pageNumber, maxPostsInFeed,
|
||||
self.server.session,
|
||||
base_dir,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
nickname,
|
||||
domain,
|
||||
|
@ -11844,7 +11844,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
authorized,
|
||||
getPerson, sharesFileType,
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitter_replacement_domain,
|
||||
|
@ -11965,7 +11965,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
authorized,
|
||||
getPerson, 'following',
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitter_replacement_domain,
|
||||
|
@ -12085,7 +12085,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
authorized,
|
||||
getPerson, 'followers',
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitter_replacement_domain,
|
||||
|
@ -12221,7 +12221,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
authorized,
|
||||
actorJson, 'posts',
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitter_replacement_domain,
|
||||
|
@ -12985,7 +12985,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.recentPostsCache,
|
||||
self.server.max_recent_posts,
|
||||
self.server.session,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
self.server.port,
|
||||
post_json_object,
|
||||
|
@ -15916,7 +15916,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.defaultTimeline,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
self.server.cachedWebfingers,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
self.server.allow_deletion,
|
||||
self.server.project_version,
|
||||
|
@ -18740,7 +18740,7 @@ def runDaemon(content_license_url: str,
|
|||
httpd.base_dir = base_dir
|
||||
httpd.instance_id = instance_id
|
||||
httpd.person_cache = {}
|
||||
httpd.cachedWebfingers = {}
|
||||
httpd.cached_webfingers = {}
|
||||
httpd.faviconsCache = {}
|
||||
httpd.proxy_type = proxy_type
|
||||
httpd.session = None
|
||||
|
@ -18924,7 +18924,7 @@ def runDaemon(content_license_url: str,
|
|||
httpd.max_recent_posts,
|
||||
project_version,
|
||||
base_dir, http_prefix, httpd.send_threads,
|
||||
httpd.postLog, httpd.cachedWebfingers,
|
||||
httpd.postLog, httpd.cached_webfingers,
|
||||
httpd.person_cache, httpd.inboxQueue,
|
||||
domain, onion_domain, i2p_domain,
|
||||
port, proxy_type,
|
||||
|
|
|
@ -30,7 +30,7 @@ def sendDeleteViaServer(base_dir: str, session,
|
|||
fromNickname: str, password: str,
|
||||
fromDomain: str, fromPort: int,
|
||||
http_prefix: str, deleteObjectUrl: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates a delete request message via c2s
|
||||
|
@ -58,7 +58,7 @@ def sendDeleteViaServer(base_dir: str, session,
|
|||
|
||||
# lookup the inbox for the To handle
|
||||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix, cachedWebfingers,
|
||||
webfingerHandle(session, handle, http_prefix, cached_webfingers,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
|
|
@ -415,7 +415,7 @@ def _sayCommand(content: str, sayStr: str, screenreader: str,
|
|||
def _desktopReplyToPost(session, postId: str,
|
||||
base_dir: str, nickname: str, password: str,
|
||||
domain: str, port: int, http_prefix: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, subject: str,
|
||||
screenreader: str, systemLanguage: str,
|
||||
espeak, conversationId: str,
|
||||
|
@ -473,7 +473,7 @@ def _desktopReplyToPost(session, postId: str,
|
|||
http_prefix, replyMessage, followersOnly,
|
||||
commentsEnabled, attach, mediaType,
|
||||
attachedImageDescription, city,
|
||||
cachedWebfingers, person_cache, isArticle,
|
||||
cached_webfingers, person_cache, isArticle,
|
||||
systemLanguage, low_bandwidth,
|
||||
content_license_url,
|
||||
debug, postId, postId,
|
||||
|
@ -487,7 +487,7 @@ def _desktopReplyToPost(session, postId: str,
|
|||
def _desktopNewPost(session,
|
||||
base_dir: str, nickname: str, password: str,
|
||||
domain: str, port: int, http_prefix: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool,
|
||||
screenreader: str, systemLanguage: str,
|
||||
espeak, low_bandwidth: bool,
|
||||
|
@ -540,7 +540,7 @@ def _desktopNewPost(session,
|
|||
http_prefix, newMessage, followersOnly,
|
||||
commentsEnabled, attach, mediaType,
|
||||
attachedImageDescription, city,
|
||||
cachedWebfingers, person_cache, isArticle,
|
||||
cached_webfingers, person_cache, isArticle,
|
||||
systemLanguage, low_bandwidth,
|
||||
content_license_url,
|
||||
debug, None, None,
|
||||
|
@ -1128,7 +1128,7 @@ def _desktopShowBox(indent: str,
|
|||
def _desktopNewDM(session, toHandle: str,
|
||||
base_dir: str, nickname: str, password: str,
|
||||
domain: str, port: int, http_prefix: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool,
|
||||
screenreader: str, systemLanguage: str,
|
||||
espeak, low_bandwidth: bool,
|
||||
|
@ -1151,7 +1151,7 @@ def _desktopNewDM(session, toHandle: str,
|
|||
_desktopNewDMbase(session, handle,
|
||||
base_dir, nickname, password,
|
||||
domain, port, http_prefix,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
debug,
|
||||
screenreader, systemLanguage,
|
||||
espeak, low_bandwidth,
|
||||
|
@ -1162,7 +1162,7 @@ def _desktopNewDM(session, toHandle: str,
|
|||
def _desktopNewDMbase(session, toHandle: str,
|
||||
base_dir: str, nickname: str, password: str,
|
||||
domain: str, port: int, http_prefix: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool,
|
||||
screenreader: str, systemLanguage: str,
|
||||
espeak, low_bandwidth: bool,
|
||||
|
@ -1255,7 +1255,7 @@ def _desktopNewDMbase(session, toHandle: str,
|
|||
http_prefix, newMessage, followersOnly,
|
||||
commentsEnabled, attach, mediaType,
|
||||
attachedImageDescription, city,
|
||||
cachedWebfingers, person_cache, isArticle,
|
||||
cached_webfingers, person_cache, isArticle,
|
||||
systemLanguage, low_bandwidth,
|
||||
content_license_url,
|
||||
debug, None, None,
|
||||
|
@ -1387,7 +1387,7 @@ def runDesktopClient(base_dir: str, proxy_type: str, http_prefix: str,
|
|||
gender = None
|
||||
messageStr = None
|
||||
content = None
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
person_cache = {}
|
||||
newRepliesExist = False
|
||||
newDMsExist = False
|
||||
|
@ -1433,7 +1433,7 @@ def runDesktopClient(base_dir: str, proxy_type: str, http_prefix: str,
|
|||
pgpPublicKeyUpload(base_dir, session,
|
||||
nickname, password,
|
||||
domain, port, http_prefix,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
debug, False,
|
||||
signingPrivateKeyPem)
|
||||
sayStr = indent + 'PGP public key uploaded'
|
||||
|
@ -1452,7 +1452,7 @@ def runDesktopClient(base_dir: str, proxy_type: str, http_prefix: str,
|
|||
nickname, password,
|
||||
domain, port,
|
||||
http_prefix, 1,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
debug, __version__,
|
||||
signingPrivateKeyPem)
|
||||
|
||||
|
@ -1727,7 +1727,7 @@ def runDesktopClient(base_dir: str, proxy_type: str, http_prefix: str,
|
|||
_desktopReplyToPost(sessionReply, postId,
|
||||
base_dir, nickname, password,
|
||||
domain, port, http_prefix,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
debug, subject,
|
||||
screenreader, systemLanguage,
|
||||
espeak, conversationId,
|
||||
|
@ -1764,7 +1764,7 @@ def runDesktopClient(base_dir: str, proxy_type: str, http_prefix: str,
|
|||
_desktopNewDM(sessionPost, toHandle,
|
||||
base_dir, nickname, password,
|
||||
domain, port, http_prefix,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
debug,
|
||||
screenreader, systemLanguage,
|
||||
espeak, low_bandwidth,
|
||||
|
@ -1776,7 +1776,7 @@ def runDesktopClient(base_dir: str, proxy_type: str, http_prefix: str,
|
|||
_desktopNewPost(sessionPost,
|
||||
base_dir, nickname, password,
|
||||
domain, port, http_prefix,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
debug,
|
||||
screenreader, systemLanguage,
|
||||
espeak, low_bandwidth,
|
||||
|
@ -1806,7 +1806,7 @@ def runDesktopClient(base_dir: str, proxy_type: str, http_prefix: str,
|
|||
nickname, password,
|
||||
domain, port, http_prefix,
|
||||
post_json_object['id'],
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
False, __version__,
|
||||
signingPrivateKeyPem)
|
||||
refreshTimeline = True
|
||||
|
@ -1846,7 +1846,7 @@ def runDesktopClient(base_dir: str, proxy_type: str, http_prefix: str,
|
|||
domain, port,
|
||||
http_prefix,
|
||||
post_json_object['id'],
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
False, __version__,
|
||||
signingPrivateKeyPem)
|
||||
|
@ -1877,7 +1877,7 @@ def runDesktopClient(base_dir: str, proxy_type: str, http_prefix: str,
|
|||
nickname, password,
|
||||
domain, port,
|
||||
http_prefix, post_json_object['id'],
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
False, __version__,
|
||||
signingPrivateKeyPem)
|
||||
refreshTimeline = True
|
||||
|
@ -1918,7 +1918,7 @@ def runDesktopClient(base_dir: str, proxy_type: str, http_prefix: str,
|
|||
nickname, password,
|
||||
domain, port, http_prefix,
|
||||
post_json_object['id'],
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
False, __version__,
|
||||
signingPrivateKeyPem)
|
||||
|
@ -1949,7 +1949,7 @@ def runDesktopClient(base_dir: str, proxy_type: str, http_prefix: str,
|
|||
nickname, password,
|
||||
domain, port, http_prefix,
|
||||
post_json_object['id'],
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
False, __version__,
|
||||
signingPrivateKeyPem)
|
||||
refreshTimeline = True
|
||||
|
@ -1984,7 +1984,7 @@ def runDesktopClient(base_dir: str, proxy_type: str, http_prefix: str,
|
|||
domain, port,
|
||||
http_prefix,
|
||||
blockActor,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
False, __version__,
|
||||
signingPrivateKeyPem)
|
||||
|
@ -2030,7 +2030,7 @@ def runDesktopClient(base_dir: str, proxy_type: str, http_prefix: str,
|
|||
domain, port,
|
||||
http_prefix,
|
||||
blockActor,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
False, __version__,
|
||||
signingPrivateKeyPem)
|
||||
|
@ -2060,7 +2060,7 @@ def runDesktopClient(base_dir: str, proxy_type: str, http_prefix: str,
|
|||
nickname, password,
|
||||
domain, port, http_prefix,
|
||||
post_json_object['id'],
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
False, __version__,
|
||||
signingPrivateKeyPem)
|
||||
refreshTimeline = True
|
||||
|
@ -2091,7 +2091,7 @@ def runDesktopClient(base_dir: str, proxy_type: str, http_prefix: str,
|
|||
nickname, password,
|
||||
domain, port,
|
||||
http_prefix, postId,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
True, __version__,
|
||||
signingPrivateKeyPem)
|
||||
refreshTimeline = True
|
||||
|
@ -2125,7 +2125,7 @@ def runDesktopClient(base_dir: str, proxy_type: str, http_prefix: str,
|
|||
nickname, password,
|
||||
domain, port,
|
||||
http_prefix, postId,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
True, __version__,
|
||||
signingPrivateKeyPem)
|
||||
|
@ -2143,7 +2143,7 @@ def runDesktopClient(base_dir: str, proxy_type: str, http_prefix: str,
|
|||
nickname, password,
|
||||
domain, port,
|
||||
http_prefix, currPage,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
debug, __version__,
|
||||
signingPrivateKeyPem)
|
||||
if followRequestsJson:
|
||||
|
@ -2163,7 +2163,7 @@ def runDesktopClient(base_dir: str, proxy_type: str, http_prefix: str,
|
|||
nickname, password,
|
||||
domain, port,
|
||||
http_prefix, currPage,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
debug, __version__,
|
||||
signingPrivateKeyPem)
|
||||
if followingJson:
|
||||
|
@ -2184,7 +2184,7 @@ def runDesktopClient(base_dir: str, proxy_type: str, http_prefix: str,
|
|||
nickname, password,
|
||||
domain, port,
|
||||
http_prefix, currPage,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
debug, __version__,
|
||||
signingPrivateKeyPem)
|
||||
if followersJson:
|
||||
|
@ -2223,7 +2223,7 @@ def runDesktopClient(base_dir: str, proxy_type: str, http_prefix: str,
|
|||
followDomain,
|
||||
followPort,
|
||||
http_prefix,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
debug, __version__,
|
||||
signingPrivateKeyPem)
|
||||
|
@ -2258,7 +2258,7 @@ def runDesktopClient(base_dir: str, proxy_type: str, http_prefix: str,
|
|||
followDomain,
|
||||
followPort,
|
||||
http_prefix,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
debug, __version__,
|
||||
signingPrivateKeyPem)
|
||||
|
@ -2287,7 +2287,7 @@ def runDesktopClient(base_dir: str, proxy_type: str, http_prefix: str,
|
|||
domain, port,
|
||||
http_prefix,
|
||||
approveHandle,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
debug,
|
||||
__version__,
|
||||
|
@ -2320,7 +2320,7 @@ def runDesktopClient(base_dir: str, proxy_type: str, http_prefix: str,
|
|||
domain, port,
|
||||
http_prefix,
|
||||
denyHandle,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
debug,
|
||||
__version__,
|
||||
|
@ -2495,7 +2495,7 @@ def runDesktopClient(base_dir: str, proxy_type: str, http_prefix: str,
|
|||
domain, port,
|
||||
http_prefix,
|
||||
post_json_object['id'],
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
False, __version__,
|
||||
signingPrivateKeyPem)
|
||||
|
|
112
epicyon.py
112
epicyon.py
|
@ -1184,7 +1184,7 @@ if args.approve:
|
|||
session = createSession(proxy_type)
|
||||
send_threads = []
|
||||
postLog = []
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
person_cache = {}
|
||||
if not domain:
|
||||
domain = getConfigParam(base_dir, 'domain')
|
||||
|
@ -1197,7 +1197,7 @@ if args.approve:
|
|||
args.approve,
|
||||
federationList,
|
||||
send_threads, postLog,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
debug, __version__,
|
||||
signingPrivateKeyPem)
|
||||
sys.exit()
|
||||
|
@ -1212,7 +1212,7 @@ if args.deny:
|
|||
session = createSession(proxy_type)
|
||||
send_threads = []
|
||||
postLog = []
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
person_cache = {}
|
||||
if not domain:
|
||||
domain = getConfigParam(base_dir, 'domain')
|
||||
|
@ -1225,7 +1225,7 @@ if args.deny:
|
|||
args.deny,
|
||||
federationList,
|
||||
send_threads, postLog,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
debug, __version__,
|
||||
signingPrivateKeyPem)
|
||||
sys.exit()
|
||||
|
@ -1298,7 +1298,7 @@ if args.message:
|
|||
send_threads = []
|
||||
postLog = []
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
subject = args.subject
|
||||
attach = args.attach
|
||||
mediaType = None
|
||||
|
@ -1321,7 +1321,7 @@ if args.message:
|
|||
http_prefix, sendMessage, followersOnly,
|
||||
args.commentsEnabled, attach, mediaType,
|
||||
attachedImageDescription, city,
|
||||
cachedWebfingers, person_cache, isArticle,
|
||||
cached_webfingers, person_cache, isArticle,
|
||||
args.language, args.low_bandwidth,
|
||||
args.content_license_url, args.debug,
|
||||
replyTo, replyTo, args.conversationId, subject)
|
||||
|
@ -1344,7 +1344,7 @@ if args.announce:
|
|||
|
||||
session = createSession(proxy_type)
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
if not domain:
|
||||
domain = getConfigParam(base_dir, 'domain')
|
||||
signingPrivateKeyPem = None
|
||||
|
@ -1355,7 +1355,7 @@ if args.announce:
|
|||
sendAnnounceViaServer(base_dir, session, args.nickname, args.password,
|
||||
domain, port,
|
||||
http_prefix, args.announce,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
True, __version__, signingPrivateKeyPem)
|
||||
for i in range(10):
|
||||
# TODO detect send success/fail
|
||||
|
@ -1449,7 +1449,7 @@ if args.itemName:
|
|||
|
||||
session = createSession(proxy_type)
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
if not domain:
|
||||
domain = getConfigParam(base_dir, 'domain')
|
||||
signingPrivateKeyPem = None
|
||||
|
@ -1469,7 +1469,7 @@ if args.itemName:
|
|||
args.itemCategory,
|
||||
args.location,
|
||||
args.duration,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
debug, __version__,
|
||||
args.itemPrice, args.itemCurrency,
|
||||
signingPrivateKeyPem)
|
||||
|
@ -1492,7 +1492,7 @@ if args.undoItemName:
|
|||
|
||||
session = createSession(proxy_type)
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
if not domain:
|
||||
domain = getConfigParam(base_dir, 'domain')
|
||||
signingPrivateKeyPem = None
|
||||
|
@ -1505,7 +1505,7 @@ if args.undoItemName:
|
|||
domain, port,
|
||||
http_prefix,
|
||||
args.undoItemName,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
debug, __version__, signingPrivateKeyPem)
|
||||
for i in range(10):
|
||||
# TODO detect send success/fail
|
||||
|
@ -1554,7 +1554,7 @@ if args.wantedItemName:
|
|||
|
||||
session = createSession(proxy_type)
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
if not domain:
|
||||
domain = getConfigParam(base_dir, 'domain')
|
||||
signingPrivateKeyPem = None
|
||||
|
@ -1574,7 +1574,7 @@ if args.wantedItemName:
|
|||
args.itemCategory,
|
||||
args.location,
|
||||
args.duration,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
debug, __version__,
|
||||
args.itemPrice, args.itemCurrency,
|
||||
signingPrivateKeyPem)
|
||||
|
@ -1597,7 +1597,7 @@ if args.undoWantedItemName:
|
|||
|
||||
session = createSession(proxy_type)
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
if not domain:
|
||||
domain = getConfigParam(base_dir, 'domain')
|
||||
signingPrivateKeyPem = None
|
||||
|
@ -1610,7 +1610,7 @@ if args.undoWantedItemName:
|
|||
domain, port,
|
||||
http_prefix,
|
||||
args.undoWantedItemName,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
debug, __version__, signingPrivateKeyPem)
|
||||
for i in range(10):
|
||||
# TODO detect send success/fail
|
||||
|
@ -1631,7 +1631,7 @@ if args.like:
|
|||
|
||||
session = createSession(proxy_type)
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
if not domain:
|
||||
domain = getConfigParam(base_dir, 'domain')
|
||||
signingPrivateKeyPem = None
|
||||
|
@ -1643,7 +1643,7 @@ if args.like:
|
|||
args.nickname, args.password,
|
||||
domain, port,
|
||||
http_prefix, args.like,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
True, __version__, signingPrivateKeyPem)
|
||||
for i in range(10):
|
||||
# TODO detect send success/fail
|
||||
|
@ -1670,7 +1670,7 @@ if args.react:
|
|||
|
||||
session = createSession(proxy_type)
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
if not domain:
|
||||
domain = getConfigParam(base_dir, 'domain')
|
||||
signingPrivateKeyPem = None
|
||||
|
@ -1682,7 +1682,7 @@ if args.react:
|
|||
args.nickname, args.password,
|
||||
domain, port,
|
||||
http_prefix, args.react, args.emoji,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
True, __version__, signingPrivateKeyPem)
|
||||
for i in range(10):
|
||||
# TODO detect send success/fail
|
||||
|
@ -1703,7 +1703,7 @@ if args.undolike:
|
|||
|
||||
session = createSession(proxy_type)
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
if not domain:
|
||||
domain = getConfigParam(base_dir, 'domain')
|
||||
signingPrivateKeyPem = None
|
||||
|
@ -1715,7 +1715,7 @@ if args.undolike:
|
|||
args.nickname, args.password,
|
||||
domain, port,
|
||||
http_prefix, args.undolike,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
True, __version__,
|
||||
signingPrivateKeyPem)
|
||||
for i in range(10):
|
||||
|
@ -1743,7 +1743,7 @@ if args.undoreact:
|
|||
|
||||
session = createSession(proxy_type)
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
if not domain:
|
||||
domain = getConfigParam(base_dir, 'domain')
|
||||
signingPrivateKeyPem = None
|
||||
|
@ -1755,7 +1755,7 @@ if args.undoreact:
|
|||
args.nickname, args.password,
|
||||
domain, port,
|
||||
http_prefix, args.undoreact, args.emoji,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
True, __version__,
|
||||
signingPrivateKeyPem)
|
||||
for i in range(10):
|
||||
|
@ -1777,7 +1777,7 @@ if args.bookmark:
|
|||
|
||||
session = createSession(proxy_type)
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
if not domain:
|
||||
domain = getConfigParam(base_dir, 'domain')
|
||||
signingPrivateKeyPem = None
|
||||
|
@ -1789,7 +1789,7 @@ if args.bookmark:
|
|||
args.nickname, args.password,
|
||||
domain, port,
|
||||
http_prefix, args.bookmark,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
True, __version__,
|
||||
signingPrivateKeyPem)
|
||||
for i in range(10):
|
||||
|
@ -1811,7 +1811,7 @@ if args.unbookmark:
|
|||
|
||||
session = createSession(proxy_type)
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
if not domain:
|
||||
domain = getConfigParam(base_dir, 'domain')
|
||||
signingPrivateKeyPem = None
|
||||
|
@ -1823,7 +1823,7 @@ if args.unbookmark:
|
|||
args.nickname, args.password,
|
||||
domain, port,
|
||||
http_prefix, args.unbookmark,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
True, __version__, signingPrivateKeyPem)
|
||||
for i in range(10):
|
||||
# TODO detect send success/fail
|
||||
|
@ -1844,7 +1844,7 @@ if args.delete:
|
|||
|
||||
session = createSession(proxy_type)
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
if not domain:
|
||||
domain = getConfigParam(base_dir, 'domain')
|
||||
signingPrivateKeyPem = None
|
||||
|
@ -1856,7 +1856,7 @@ if args.delete:
|
|||
args.nickname, args.password,
|
||||
domain, port,
|
||||
http_prefix, args.delete,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
True, __version__, signingPrivateKeyPem)
|
||||
for i in range(10):
|
||||
# TODO detect send success/fail
|
||||
|
@ -1886,7 +1886,7 @@ if args.follow:
|
|||
|
||||
session = createSession(proxy_type)
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
followHttpPrefix = http_prefix
|
||||
if args.follow.startswith('https'):
|
||||
followHttpPrefix = 'https'
|
||||
|
@ -1901,7 +1901,7 @@ if args.follow:
|
|||
domain, port,
|
||||
followNickname, followDomain, followPort,
|
||||
http_prefix,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
debug, __version__, signingPrivateKeyPem)
|
||||
for t in range(20):
|
||||
time.sleep(1)
|
||||
|
@ -1932,7 +1932,7 @@ if args.unfollow:
|
|||
|
||||
session = createSession(proxy_type)
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
followHttpPrefix = http_prefix
|
||||
if args.follow.startswith('https'):
|
||||
followHttpPrefix = 'https'
|
||||
|
@ -1947,7 +1947,7 @@ if args.unfollow:
|
|||
domain, port,
|
||||
followNickname, followDomain, followPort,
|
||||
http_prefix,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
debug, __version__, signingPrivateKeyPem)
|
||||
for t in range(20):
|
||||
time.sleep(1)
|
||||
|
@ -1969,7 +1969,7 @@ if args.followingList:
|
|||
|
||||
session = createSession(proxy_type)
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
followHttpPrefix = http_prefix
|
||||
if not domain:
|
||||
domain = getConfigParam(base_dir, 'domain')
|
||||
|
@ -1982,7 +1982,7 @@ if args.followingList:
|
|||
args.nickname, args.password,
|
||||
domain, port,
|
||||
http_prefix, args.pageNumber,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
debug, __version__, signingPrivateKeyPem)
|
||||
if followingJson:
|
||||
pprint(followingJson)
|
||||
|
@ -2002,7 +2002,7 @@ if args.followersList:
|
|||
|
||||
session = createSession(proxy_type)
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
followHttpPrefix = http_prefix
|
||||
if not domain:
|
||||
domain = getConfigParam(base_dir, 'domain')
|
||||
|
@ -2015,7 +2015,7 @@ if args.followersList:
|
|||
args.nickname, args.password,
|
||||
domain, port,
|
||||
http_prefix, args.pageNumber,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
debug, __version__,
|
||||
signingPrivateKeyPem)
|
||||
if followersJson:
|
||||
|
@ -2036,7 +2036,7 @@ if args.followRequestsList:
|
|||
|
||||
session = createSession(proxy_type)
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
followHttpPrefix = http_prefix
|
||||
if not domain:
|
||||
domain = getConfigParam(base_dir, 'domain')
|
||||
|
@ -2049,7 +2049,7 @@ if args.followRequestsList:
|
|||
args.nickname, args.password,
|
||||
domain, port,
|
||||
http_prefix, args.pageNumber,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
debug, __version__, signingPrivateKeyPem)
|
||||
if followRequestsJson:
|
||||
pprint(followRequestsJson)
|
||||
|
@ -2073,7 +2073,7 @@ if args.i2p:
|
|||
http_prefix = 'http'
|
||||
|
||||
if args.migrations:
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
if args.http or domain.endswith('.onion'):
|
||||
http_prefix = 'http'
|
||||
port = 80
|
||||
|
@ -2096,7 +2096,7 @@ if args.migrations:
|
|||
if args.secure_mode:
|
||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||
ctr = migrateAccounts(base_dir, session,
|
||||
http_prefix, cachedWebfingers,
|
||||
http_prefix, cached_webfingers,
|
||||
True, signingPrivateKeyPem)
|
||||
if ctr == 0:
|
||||
print('No followed accounts have moved')
|
||||
|
@ -2170,7 +2170,7 @@ if args.followers:
|
|||
nickname = args.followers.split('@')[0]
|
||||
domain = args.followers.split('@')[1]
|
||||
domain = domain.replace('\n', '').replace('\r', '')
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
if args.http or domain.endswith('.onion'):
|
||||
http_prefix = 'http'
|
||||
port = 80
|
||||
|
@ -2198,7 +2198,7 @@ if args.followers:
|
|||
if args.secure_mode:
|
||||
signingPrivateKeyPem = getInstanceActorKey(base_dir, domain)
|
||||
wfRequest = webfingerHandle(session, handle,
|
||||
http_prefix, cachedWebfingers,
|
||||
http_prefix, cached_webfingers,
|
||||
hostDomain, __version__, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
@ -2497,7 +2497,7 @@ if args.skill:
|
|||
|
||||
session = createSession(proxy_type)
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
if not domain:
|
||||
domain = getConfigParam(base_dir, 'domain')
|
||||
signingPrivateKeyPem = None
|
||||
|
@ -2511,7 +2511,7 @@ if args.skill:
|
|||
domain, port,
|
||||
http_prefix,
|
||||
args.skill, args.skillLevelPercent,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
True, __version__, signingPrivateKeyPem)
|
||||
for i in range(10):
|
||||
# TODO detect send success/fail
|
||||
|
@ -2532,7 +2532,7 @@ if args.availability:
|
|||
|
||||
session = createSession(proxy_type)
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
if not domain:
|
||||
domain = getConfigParam(base_dir, 'domain')
|
||||
signingPrivateKeyPem = None
|
||||
|
@ -2545,7 +2545,7 @@ if args.availability:
|
|||
domain, port,
|
||||
http_prefix,
|
||||
args.availability,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
True, __version__, signingPrivateKeyPem)
|
||||
for i in range(10):
|
||||
# TODO detect send success/fail
|
||||
|
@ -2646,7 +2646,7 @@ if args.block:
|
|||
|
||||
session = createSession(proxy_type)
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
if not domain:
|
||||
domain = getConfigParam(base_dir, 'domain')
|
||||
signingPrivateKeyPem = None
|
||||
|
@ -2657,7 +2657,7 @@ if args.block:
|
|||
sendBlockViaServer(base_dir, session, nickname, args.password,
|
||||
domain, port,
|
||||
http_prefix, args.block,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
True, __version__, signingPrivateKeyPem)
|
||||
for i in range(10):
|
||||
# TODO detect send success/fail
|
||||
|
@ -2678,7 +2678,7 @@ if args.mute:
|
|||
|
||||
session = createSession(proxy_type)
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
if not domain:
|
||||
domain = getConfigParam(base_dir, 'domain')
|
||||
signingPrivateKeyPem = None
|
||||
|
@ -2689,7 +2689,7 @@ if args.mute:
|
|||
sendMuteViaServer(base_dir, session, nickname, args.password,
|
||||
domain, port,
|
||||
http_prefix, args.mute,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
True, __version__, signingPrivateKeyPem)
|
||||
for i in range(10):
|
||||
# TODO detect send success/fail
|
||||
|
@ -2710,7 +2710,7 @@ if args.unmute:
|
|||
|
||||
session = createSession(proxy_type)
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
if not domain:
|
||||
domain = getConfigParam(base_dir, 'domain')
|
||||
signingPrivateKeyPem = None
|
||||
|
@ -2721,7 +2721,7 @@ if args.unmute:
|
|||
sendUndoMuteViaServer(base_dir, session, nickname, args.password,
|
||||
domain, port,
|
||||
http_prefix, args.unmute,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
True, __version__, signingPrivateKeyPem)
|
||||
for i in range(10):
|
||||
# TODO detect send success/fail
|
||||
|
@ -2754,7 +2754,7 @@ if args.unblock:
|
|||
|
||||
session = createSession(proxy_type)
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
if not domain:
|
||||
domain = getConfigParam(base_dir, 'domain')
|
||||
signingPrivateKeyPem = None
|
||||
|
@ -2765,7 +2765,7 @@ if args.unblock:
|
|||
sendUndoBlockViaServer(base_dir, session, nickname, args.password,
|
||||
domain, port,
|
||||
http_prefix, args.unblock,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
True, __version__, signingPrivateKeyPem)
|
||||
for i in range(10):
|
||||
# TODO detect send success/fail
|
||||
|
|
30
follow.py
30
follow.py
|
@ -719,7 +719,7 @@ def followedAccountAccepts(session, base_dir: str, http_prefix: str,
|
|||
nickname: str, domain: str, fromPort: int,
|
||||
personUrl: str, federationList: [],
|
||||
followJson: {}, send_threads: [], postLog: [],
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
removeFollowActivity: bool,
|
||||
signingPrivateKeyPem: str):
|
||||
|
@ -770,7 +770,7 @@ def followedAccountAccepts(session, base_dir: str, http_prefix: str,
|
|||
nickname, domain, fromPort, '',
|
||||
http_prefix, True, client_to_server,
|
||||
federationList,
|
||||
send_threads, postLog, cachedWebfingers,
|
||||
send_threads, postLog, cached_webfingers,
|
||||
person_cache, debug, project_version, None,
|
||||
groupAccount, signingPrivateKeyPem,
|
||||
7856837)
|
||||
|
@ -782,7 +782,7 @@ def followedAccountRejects(session, base_dir: str, http_prefix: str,
|
|||
nickname: str, domain: str, fromPort: int,
|
||||
federationList: [],
|
||||
send_threads: [], postLog: [],
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str):
|
||||
"""The person receiving a follow request rejects the new follower
|
||||
|
@ -838,7 +838,7 @@ def followedAccountRejects(session, base_dir: str, http_prefix: str,
|
|||
nickname, domain, fromPort, '',
|
||||
http_prefix, True, client_to_server,
|
||||
federationList,
|
||||
send_threads, postLog, cachedWebfingers,
|
||||
send_threads, postLog, cached_webfingers,
|
||||
person_cache, debug, project_version, None,
|
||||
groupAccount, signingPrivateKeyPem,
|
||||
6393063)
|
||||
|
@ -850,7 +850,7 @@ def sendFollowRequest(session, base_dir: str,
|
|||
followedActor: str,
|
||||
followPort: int, followHttpPrefix: str,
|
||||
client_to_server: bool, federationList: [],
|
||||
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||
send_threads: [], postLog: [], cached_webfingers: {},
|
||||
person_cache: {}, debug: bool,
|
||||
project_version: str, signingPrivateKeyPem: str) -> {}:
|
||||
"""Gets the json object for sending a follow request
|
||||
|
@ -930,7 +930,7 @@ def sendFollowRequest(session, base_dir: str,
|
|||
'https://www.w3.org/ns/activitystreams#Public',
|
||||
http_prefix, True, client_to_server,
|
||||
federationList,
|
||||
send_threads, postLog, cachedWebfingers, person_cache,
|
||||
send_threads, postLog, cached_webfingers, person_cache,
|
||||
debug, project_version, None, groupAccount,
|
||||
signingPrivateKeyPem, 8234389)
|
||||
|
||||
|
@ -943,7 +943,7 @@ def sendFollowRequestViaServer(base_dir: str, session,
|
|||
followNickname: str, followDomain: str,
|
||||
followPort: int,
|
||||
http_prefix: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates a follow request via c2s
|
||||
|
@ -973,7 +973,7 @@ def sendFollowRequestViaServer(base_dir: str, session,
|
|||
|
||||
# lookup the inbox for the To handle
|
||||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix, cachedWebfingers,
|
||||
webfingerHandle(session, handle, http_prefix, cached_webfingers,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
@ -1033,7 +1033,7 @@ def sendUnfollowRequestViaServer(base_dir: str, session,
|
|||
followNickname: str, followDomain: str,
|
||||
followPort: int,
|
||||
http_prefix: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates a unfollow request via c2s
|
||||
|
@ -1067,7 +1067,7 @@ def sendUnfollowRequestViaServer(base_dir: str, session,
|
|||
|
||||
# lookup the inbox for the To handle
|
||||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix, cachedWebfingers,
|
||||
webfingerHandle(session, handle, http_prefix, cached_webfingers,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
@ -1128,7 +1128,7 @@ def getFollowingViaServer(base_dir: str, session,
|
|||
nickname: str, password: str,
|
||||
domain: str, port: int,
|
||||
http_prefix: str, pageNumber: int,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Gets a page from the following collection as json
|
||||
|
@ -1169,7 +1169,7 @@ def getFollowersViaServer(base_dir: str, session,
|
|||
nickname: str, password: str,
|
||||
domain: str, port: int,
|
||||
http_prefix: str, pageNumber: int,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Gets a page from the followers collection as json
|
||||
|
@ -1210,7 +1210,7 @@ def getFollowRequestsViaServer(base_dir: str, session,
|
|||
nickname: str, password: str,
|
||||
domain: str, port: int,
|
||||
http_prefix: str, pageNumber: int,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Gets a page from the follow requests collection as json
|
||||
|
@ -1251,7 +1251,7 @@ def approveFollowRequestViaServer(base_dir: str, session,
|
|||
nickname: str, password: str,
|
||||
domain: str, port: int,
|
||||
http_prefix: str, approveHandle: int,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> str:
|
||||
"""Approves a follow request
|
||||
|
@ -1292,7 +1292,7 @@ def denyFollowRequestViaServer(base_dir: str, session,
|
|||
nickname: str, password: str,
|
||||
domain: str, port: int,
|
||||
http_prefix: str, denyHandle: int,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> str:
|
||||
"""Denies a follow request
|
||||
|
|
105
inbox.py
105
inbox.py
|
@ -281,7 +281,8 @@ def storeHashTags(base_dir: str, nickname: str, domain: str,
|
|||
def _inboxStorePostToHtmlCache(recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {},
|
||||
base_dir: str, http_prefix: str,
|
||||
session, cachedWebfingers: {}, person_cache: {},
|
||||
session, cached_webfingers: {},
|
||||
person_cache: {},
|
||||
nickname: str, domain: str, port: int,
|
||||
post_json_object: {},
|
||||
allow_deletion: bool, boxname: str,
|
||||
|
@ -307,7 +308,7 @@ def _inboxStorePostToHtmlCache(recentPostsCache: {}, max_recent_posts: int,
|
|||
individualPostAsHtml(signingPrivateKeyPem,
|
||||
True, recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
base_dir, session, cachedWebfingers,
|
||||
base_dir, session, cached_webfingers,
|
||||
person_cache,
|
||||
nickname, domain, port, post_json_object,
|
||||
avatarUrl, True, allow_deletion,
|
||||
|
@ -794,7 +795,7 @@ def _receiveUndoFollow(session, base_dir: str, http_prefix: str,
|
|||
|
||||
def _receiveUndo(session, base_dir: str, http_prefix: str,
|
||||
port: int, send_threads: [], postLog: [],
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
messageJson: {}, federationList: [],
|
||||
debug: bool) -> bool:
|
||||
"""Receives an undo request within the POST section of HTTPServer
|
||||
|
@ -940,7 +941,7 @@ def _receiveUpdateToQuestion(recentPostsCache: {}, messageJson: {},
|
|||
|
||||
def _receiveUpdate(recentPostsCache: {}, session, base_dir: str,
|
||||
http_prefix: str, domain: str, port: int,
|
||||
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||
send_threads: [], postLog: [], cached_webfingers: {},
|
||||
person_cache: {}, messageJson: {}, federationList: [],
|
||||
nickname: str, debug: bool) -> bool:
|
||||
"""Receives an Update activity within the POST section of HTTPServer
|
||||
|
@ -994,7 +995,7 @@ def _receiveLike(recentPostsCache: {},
|
|||
session, handle: str, isGroup: bool, base_dir: str,
|
||||
http_prefix: str, domain: str, port: int,
|
||||
onion_domain: str,
|
||||
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||
send_threads: [], postLog: [], cached_webfingers: {},
|
||||
person_cache: {}, messageJson: {}, federationList: [],
|
||||
debug: bool,
|
||||
signingPrivateKeyPem: str,
|
||||
|
@ -1094,7 +1095,7 @@ def _receiveLike(recentPostsCache: {},
|
|||
individualPostAsHtml(signingPrivateKeyPem, False,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber, base_dir,
|
||||
session, cachedWebfingers, person_cache,
|
||||
session, cached_webfingers, person_cache,
|
||||
handleName, domain, port, likedPostJson,
|
||||
None, True, allow_deletion,
|
||||
http_prefix, __version__,
|
||||
|
@ -1116,7 +1117,7 @@ def _receiveLike(recentPostsCache: {},
|
|||
def _receiveUndoLike(recentPostsCache: {},
|
||||
session, handle: str, isGroup: bool, base_dir: str,
|
||||
http_prefix: str, domain: str, port: int,
|
||||
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||
send_threads: [], postLog: [], cached_webfingers: {},
|
||||
person_cache: {}, messageJson: {}, federationList: [],
|
||||
debug: bool,
|
||||
signingPrivateKeyPem: str,
|
||||
|
@ -1205,7 +1206,7 @@ def _receiveUndoLike(recentPostsCache: {},
|
|||
individualPostAsHtml(signingPrivateKeyPem, False,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber, base_dir,
|
||||
session, cachedWebfingers, person_cache,
|
||||
session, cached_webfingers, person_cache,
|
||||
handleName, domain, port, likedPostJson,
|
||||
None, True, allow_deletion,
|
||||
http_prefix, __version__,
|
||||
|
@ -1228,7 +1229,7 @@ def _receiveReaction(recentPostsCache: {},
|
|||
session, handle: str, isGroup: bool, base_dir: str,
|
||||
http_prefix: str, domain: str, port: int,
|
||||
onion_domain: str,
|
||||
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||
send_threads: [], postLog: [], cached_webfingers: {},
|
||||
person_cache: {}, messageJson: {}, federationList: [],
|
||||
debug: bool,
|
||||
signingPrivateKeyPem: str,
|
||||
|
@ -1353,7 +1354,7 @@ def _receiveReaction(recentPostsCache: {},
|
|||
individualPostAsHtml(signingPrivateKeyPem, False,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber, base_dir,
|
||||
session, cachedWebfingers, person_cache,
|
||||
session, cached_webfingers, person_cache,
|
||||
handleName, domain, port, reactionPostJson,
|
||||
None, True, allow_deletion,
|
||||
http_prefix, __version__,
|
||||
|
@ -1375,7 +1376,7 @@ def _receiveReaction(recentPostsCache: {},
|
|||
def _receiveUndoReaction(recentPostsCache: {},
|
||||
session, handle: str, isGroup: bool, base_dir: str,
|
||||
http_prefix: str, domain: str, port: int,
|
||||
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||
send_threads: [], postLog: [], cached_webfingers: {},
|
||||
person_cache: {}, messageJson: {}, federationList: [],
|
||||
debug: bool,
|
||||
signingPrivateKeyPem: str,
|
||||
|
@ -1480,7 +1481,7 @@ def _receiveUndoReaction(recentPostsCache: {},
|
|||
individualPostAsHtml(signingPrivateKeyPem, False,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber, base_dir,
|
||||
session, cachedWebfingers, person_cache,
|
||||
session, cached_webfingers, person_cache,
|
||||
handleName, domain, port, reactionPostJson,
|
||||
None, True, allow_deletion,
|
||||
http_prefix, __version__,
|
||||
|
@ -1502,7 +1503,7 @@ def _receiveUndoReaction(recentPostsCache: {},
|
|||
def _receiveBookmark(recentPostsCache: {},
|
||||
session, handle: str, isGroup: bool, base_dir: str,
|
||||
http_prefix: str, domain: str, port: int,
|
||||
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||
send_threads: [], postLog: [], cached_webfingers: {},
|
||||
person_cache: {}, messageJson: {}, federationList: [],
|
||||
debug: bool, signingPrivateKeyPem: str,
|
||||
max_recent_posts: int, translate: {},
|
||||
|
@ -1590,7 +1591,7 @@ def _receiveBookmark(recentPostsCache: {},
|
|||
individualPostAsHtml(signingPrivateKeyPem, False,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber, base_dir,
|
||||
session, cachedWebfingers, person_cache,
|
||||
session, cached_webfingers, person_cache,
|
||||
nickname, domain, port, bookmarkedPostJson,
|
||||
None, True, allow_deletion,
|
||||
http_prefix, __version__,
|
||||
|
@ -1612,7 +1613,7 @@ def _receiveBookmark(recentPostsCache: {},
|
|||
def _receiveUndoBookmark(recentPostsCache: {},
|
||||
session, handle: str, isGroup: bool, base_dir: str,
|
||||
http_prefix: str, domain: str, port: int,
|
||||
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||
send_threads: [], postLog: [], cached_webfingers: {},
|
||||
person_cache: {}, messageJson: {}, federationList: [],
|
||||
debug: bool, signingPrivateKeyPem: str,
|
||||
max_recent_posts: int, translate: {},
|
||||
|
@ -1701,7 +1702,7 @@ def _receiveUndoBookmark(recentPostsCache: {},
|
|||
individualPostAsHtml(signingPrivateKeyPem, False,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber, base_dir,
|
||||
session, cachedWebfingers, person_cache,
|
||||
session, cached_webfingers, person_cache,
|
||||
nickname, domain, port, bookmarkedPostJson,
|
||||
None, True, allow_deletion,
|
||||
http_prefix, __version__,
|
||||
|
@ -1721,7 +1722,7 @@ def _receiveUndoBookmark(recentPostsCache: {},
|
|||
|
||||
def _receiveDelete(session, handle: str, isGroup: bool, base_dir: str,
|
||||
http_prefix: str, domain: str, port: int,
|
||||
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||
send_threads: [], postLog: [], cached_webfingers: {},
|
||||
person_cache: {}, messageJson: {}, federationList: [],
|
||||
debug: bool, allow_deletion: bool,
|
||||
recentPostsCache: {}) -> bool:
|
||||
|
@ -1798,7 +1799,7 @@ def _receiveAnnounce(recentPostsCache: {},
|
|||
session, handle: str, isGroup: bool, base_dir: str,
|
||||
http_prefix: str,
|
||||
domain: str, onion_domain: str, port: int,
|
||||
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||
send_threads: [], postLog: [], cached_webfingers: {},
|
||||
person_cache: {}, messageJson: {}, federationList: [],
|
||||
debug: bool, translate: {},
|
||||
yt_replace_domain: str,
|
||||
|
@ -1908,7 +1909,7 @@ def _receiveAnnounce(recentPostsCache: {},
|
|||
individualPostAsHtml(signingPrivateKeyPem, True,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber, base_dir,
|
||||
session, cachedWebfingers, person_cache,
|
||||
session, cached_webfingers, person_cache,
|
||||
nickname, domain, port, messageJson,
|
||||
None, True, allow_deletion,
|
||||
http_prefix, __version__,
|
||||
|
@ -2025,7 +2026,7 @@ def _receiveAnnounce(recentPostsCache: {},
|
|||
def _receiveUndoAnnounce(recentPostsCache: {},
|
||||
session, handle: str, isGroup: bool, base_dir: str,
|
||||
http_prefix: str, domain: str, port: int,
|
||||
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||
send_threads: [], postLog: [], cached_webfingers: {},
|
||||
person_cache: {}, messageJson: {}, federationList: [],
|
||||
debug: bool) -> bool:
|
||||
"""Receives an undo announce activity within the POST section of HTTPServer
|
||||
|
@ -2609,7 +2610,7 @@ def _groupHandle(base_dir: str, handle: str) -> bool:
|
|||
def _sendToGroupMembers(session, base_dir: str, handle: str, port: int,
|
||||
post_json_object: {},
|
||||
http_prefix: str, federationList: [],
|
||||
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||
send_threads: [], postLog: [], cached_webfingers: {},
|
||||
person_cache: {}, debug: bool,
|
||||
systemLanguage: str,
|
||||
onion_domain: str, i2p_domain: str,
|
||||
|
@ -2663,14 +2664,14 @@ def _sendToGroupMembers(session, base_dir: str, handle: str, port: int,
|
|||
groupActor + '/followers', cc,
|
||||
http_prefix, postId, False, False,
|
||||
send_threads, postLog,
|
||||
person_cache, cachedWebfingers,
|
||||
person_cache, cached_webfingers,
|
||||
debug, __version__, signingPrivateKeyPem)
|
||||
|
||||
sendToFollowersThread(session, base_dir, nickname, domain,
|
||||
onion_domain, i2p_domain, port,
|
||||
http_prefix, federationList,
|
||||
send_threads, postLog,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
announceJson, debug, __version__,
|
||||
shared_items_federated_domains,
|
||||
sharedItemFederationTokens,
|
||||
|
@ -2792,7 +2793,7 @@ def _bounceDM(senderPostId: str, session, http_prefix: str,
|
|||
base_dir: str, nickname: str, domain: str, port: int,
|
||||
sendingHandle: str, federationList: [],
|
||||
send_threads: [], postLog: [],
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
translate: {}, debug: bool,
|
||||
lastBounceMessage: [], systemLanguage: str,
|
||||
signingPrivateKeyPem: str,
|
||||
|
@ -2866,7 +2867,7 @@ def _bounceDM(senderPostId: str, session, http_prefix: str,
|
|||
nickname, domain, port,
|
||||
senderNickname, senderDomain, senderPort, cc,
|
||||
http_prefix, False, False, federationList,
|
||||
send_threads, postLog, cachedWebfingers,
|
||||
send_threads, postLog, cached_webfingers,
|
||||
person_cache, debug, __version__, None, groupAccount,
|
||||
signingPrivateKeyPem, 7238634)
|
||||
return True
|
||||
|
@ -2877,7 +2878,7 @@ def _isValidDM(base_dir: str, nickname: str, domain: str, port: int,
|
|||
session, http_prefix: str,
|
||||
federationList: [],
|
||||
send_threads: [], postLog: [],
|
||||
cachedWebfingers: {},
|
||||
cached_webfingers: {},
|
||||
person_cache: {},
|
||||
translate: {}, debug: bool,
|
||||
lastBounceMessage: [],
|
||||
|
@ -2956,7 +2957,7 @@ def _isValidDM(base_dir: str, nickname: str, domain: str, port: int,
|
|||
port, sendH,
|
||||
federationList,
|
||||
send_threads, postLog,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
translate, debug,
|
||||
lastBounceMessage,
|
||||
|
@ -2978,7 +2979,7 @@ def _receiveQuestionVote(base_dir: str, nickname: str, domain: str,
|
|||
session, onion_domain: str,
|
||||
i2p_domain: str, port: int,
|
||||
federationList: [], send_threads: [], postLog: [],
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
signingPrivateKeyPem: str,
|
||||
max_recent_posts: int, translate: {},
|
||||
allow_deletion: bool,
|
||||
|
@ -3021,7 +3022,7 @@ def _receiveQuestionVote(base_dir: str, nickname: str, domain: str,
|
|||
individualPostAsHtml(signingPrivateKeyPem, False,
|
||||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber, base_dir,
|
||||
session, cachedWebfingers, person_cache,
|
||||
session, cached_webfingers, person_cache,
|
||||
nickname, domain, port, questionJson,
|
||||
None, True, allow_deletion,
|
||||
http_prefix, __version__,
|
||||
|
@ -3055,7 +3056,7 @@ def _receiveQuestionVote(base_dir: str, nickname: str, domain: str,
|
|||
onion_domain, i2p_domain, port,
|
||||
http_prefix, federationList,
|
||||
send_threads, postLog,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
post_json_object, debug, __version__,
|
||||
shared_items_federated_domains,
|
||||
sharedItemFederationTokens,
|
||||
|
@ -3180,7 +3181,7 @@ def _checkForGitPatches(base_dir: str, nickname: str, domain: str,
|
|||
def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
||||
session, keyId: str, handle: str, messageJson: {},
|
||||
base_dir: str, http_prefix: str, send_threads: [],
|
||||
postLog: [], cachedWebfingers: {}, person_cache: {},
|
||||
postLog: [], cached_webfingers: {}, person_cache: {},
|
||||
queue: [], domain: str,
|
||||
onion_domain: str, i2p_domain: str,
|
||||
port: int, proxy_type: str,
|
||||
|
@ -3218,7 +3219,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
|||
domain, port,
|
||||
onion_domain,
|
||||
send_threads, postLog,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
messageJson,
|
||||
federationList,
|
||||
|
@ -3240,7 +3241,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
|||
base_dir, http_prefix,
|
||||
domain, port,
|
||||
send_threads, postLog,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
messageJson,
|
||||
federationList,
|
||||
|
@ -3263,7 +3264,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
|||
domain, port,
|
||||
onion_domain,
|
||||
send_threads, postLog,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
messageJson,
|
||||
federationList,
|
||||
|
@ -3285,7 +3286,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
|||
base_dir, http_prefix,
|
||||
domain, port,
|
||||
send_threads, postLog,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
messageJson,
|
||||
federationList,
|
||||
|
@ -3307,7 +3308,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
|||
base_dir, http_prefix,
|
||||
domain, port,
|
||||
send_threads, postLog,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
messageJson,
|
||||
federationList,
|
||||
|
@ -3329,7 +3330,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
|||
base_dir, http_prefix,
|
||||
domain, port,
|
||||
send_threads, postLog,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
messageJson,
|
||||
federationList,
|
||||
|
@ -3354,7 +3355,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
|||
base_dir, http_prefix,
|
||||
domain, onion_domain, port,
|
||||
send_threads, postLog,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
messageJson,
|
||||
federationList,
|
||||
|
@ -3376,7 +3377,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
|||
base_dir, http_prefix,
|
||||
domain, port,
|
||||
send_threads, postLog,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
messageJson,
|
||||
federationList,
|
||||
|
@ -3389,7 +3390,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
|||
base_dir, http_prefix,
|
||||
domain, port,
|
||||
send_threads, postLog,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
messageJson,
|
||||
federationList,
|
||||
|
@ -3454,7 +3455,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
|||
post_json_object, recentPostsCache,
|
||||
session, onion_domain, i2p_domain, port,
|
||||
federationList, send_threads, postLog,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
signingPrivateKeyPem,
|
||||
max_recent_posts, translate,
|
||||
allow_deletion,
|
||||
|
@ -3477,7 +3478,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
|||
session, http_prefix,
|
||||
federationList,
|
||||
send_threads, postLog,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
translate, debug,
|
||||
lastBounceMessage,
|
||||
|
@ -3557,7 +3558,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
|||
max_recent_posts,
|
||||
translate, base_dir,
|
||||
http_prefix,
|
||||
session, cachedWebfingers,
|
||||
session, cached_webfingers,
|
||||
person_cache,
|
||||
handleName,
|
||||
domain, port,
|
||||
|
@ -3610,7 +3611,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
|||
_sendToGroupMembers(session, base_dir, handle, port,
|
||||
post_json_object,
|
||||
http_prefix, federationList, send_threads,
|
||||
postLog, cachedWebfingers, person_cache,
|
||||
postLog, cached_webfingers, person_cache,
|
||||
debug, systemLanguage,
|
||||
onion_domain, i2p_domain,
|
||||
signingPrivateKeyPem)
|
||||
|
@ -3847,7 +3848,7 @@ def _checkJsonSignature(base_dir: str, queueJson: {}) -> (bool, bool):
|
|||
|
||||
def _receiveFollowRequest(session, base_dir: str, http_prefix: str,
|
||||
port: int, send_threads: [], postLog: [],
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
messageJson: {}, federationList: [],
|
||||
debug: bool, project_version: str,
|
||||
max_followers: int, onion_domain: str,
|
||||
|
@ -4055,7 +4056,7 @@ def _receiveFollowRequest(session, base_dir: str, http_prefix: str,
|
|||
nickname, domain, fromPort,
|
||||
messageJson['actor'], federationList,
|
||||
messageJson, send_threads, postLog,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
debug, project_version, True,
|
||||
signingPrivateKeyPem)
|
||||
|
||||
|
@ -4064,7 +4065,7 @@ def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
|
|||
project_version: str,
|
||||
base_dir: str, http_prefix: str,
|
||||
send_threads: [], postLog: [],
|
||||
cachedWebfingers: {}, person_cache: {}, queue: [],
|
||||
cached_webfingers: {}, person_cache: {}, queue: [],
|
||||
domain: str,
|
||||
onion_domain: str, i2p_domain: str,
|
||||
port: int, proxy_type: str,
|
||||
|
@ -4347,7 +4348,7 @@ def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
|
|||
if _receiveUndo(session,
|
||||
base_dir, http_prefix, port,
|
||||
send_threads, postLog,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
queueJson['post'],
|
||||
federationList,
|
||||
|
@ -4368,7 +4369,7 @@ def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
|
|||
if _receiveFollowRequest(session,
|
||||
base_dir, http_prefix, port,
|
||||
send_threads, postLog,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
queueJson['post'],
|
||||
federationList,
|
||||
|
@ -4393,7 +4394,7 @@ def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
|
|||
if receiveAcceptReject(session,
|
||||
base_dir, http_prefix, domain, port,
|
||||
send_threads, postLog,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
queueJson['post'],
|
||||
federationList, debug):
|
||||
print('Queue: Accept/Reject received from ' + keyId)
|
||||
|
@ -4411,7 +4412,7 @@ def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
|
|||
base_dir, http_prefix,
|
||||
domain, port,
|
||||
send_threads, postLog,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
queueJson['post'],
|
||||
federationList,
|
||||
|
@ -4493,7 +4494,7 @@ def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
|
|||
queueJson['post'],
|
||||
base_dir, http_prefix,
|
||||
send_threads, postLog,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache, queue,
|
||||
domain,
|
||||
onion_domain, i2p_domain,
|
||||
|
|
16
like.py
16
like.py
|
@ -75,7 +75,7 @@ def _like(recentPostsCache: {},
|
|||
objectUrl: str, actorLiked: str,
|
||||
client_to_server: bool,
|
||||
send_threads: [], postLog: [],
|
||||
person_cache: {}, cachedWebfingers: {},
|
||||
person_cache: {}, cached_webfingers: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates a like
|
||||
|
@ -136,7 +136,7 @@ def _like(recentPostsCache: {},
|
|||
likedPostNickname, likedPostDomain, likedPostPort,
|
||||
'https://www.w3.org/ns/activitystreams#Public',
|
||||
http_prefix, True, client_to_server, federationList,
|
||||
send_threads, postLog, cachedWebfingers, person_cache,
|
||||
send_threads, postLog, cached_webfingers, person_cache,
|
||||
debug, project_version, None, groupAccount,
|
||||
signingPrivateKeyPem, 7367374)
|
||||
|
||||
|
@ -150,7 +150,7 @@ def likePost(recentPostsCache: {},
|
|||
ccList: [],
|
||||
likeStatusNumber: int, client_to_server: bool,
|
||||
send_threads: [], postLog: [],
|
||||
person_cache: {}, cachedWebfingers: {},
|
||||
person_cache: {}, cached_webfingers: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Likes a given status post. This is only used by unit tests
|
||||
|
@ -163,7 +163,7 @@ def likePost(recentPostsCache: {},
|
|||
return _like(recentPostsCache,
|
||||
session, base_dir, federationList, nickname, domain, port,
|
||||
ccList, http_prefix, objectUrl, actorLiked, client_to_server,
|
||||
send_threads, postLog, person_cache, cachedWebfingers,
|
||||
send_threads, postLog, person_cache, cached_webfingers,
|
||||
debug, project_version, signingPrivateKeyPem)
|
||||
|
||||
|
||||
|
@ -171,7 +171,7 @@ def sendLikeViaServer(base_dir: str, session,
|
|||
fromNickname: str, password: str,
|
||||
fromDomain: str, fromPort: int,
|
||||
http_prefix: str, likeUrl: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates a like via c2s
|
||||
|
@ -195,7 +195,7 @@ def sendLikeViaServer(base_dir: str, session,
|
|||
|
||||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
@ -254,7 +254,7 @@ def sendUndoLikeViaServer(base_dir: str, session,
|
|||
fromNickname: str, password: str,
|
||||
fromDomain: str, fromPort: int,
|
||||
http_prefix: str, likeUrl: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Undo a like via c2s
|
||||
|
@ -282,7 +282,7 @@ def sendUndoLikeViaServer(base_dir: str, session,
|
|||
|
||||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
|
|
@ -25,7 +25,7 @@ def manualDenyFollowRequest(session, base_dir: str,
|
|||
denyHandle: str,
|
||||
federationList: [],
|
||||
send_threads: [], postLog: [],
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool,
|
||||
project_version: str,
|
||||
signingPrivateKeyPem: str) -> None:
|
||||
|
@ -64,7 +64,7 @@ def manualDenyFollowRequest(session, base_dir: str,
|
|||
denyNickname, denyDomain, denyPort,
|
||||
federationList,
|
||||
send_threads, postLog,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
debug, project_version,
|
||||
signingPrivateKeyPem)
|
||||
|
||||
|
@ -77,7 +77,7 @@ def manualDenyFollowRequestThread(session, base_dir: str,
|
|||
denyHandle: str,
|
||||
federationList: [],
|
||||
send_threads: [], postLog: [],
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool,
|
||||
project_version: str,
|
||||
signingPrivateKeyPem: str) -> None:
|
||||
|
@ -92,7 +92,7 @@ def manualDenyFollowRequestThread(session, base_dir: str,
|
|||
denyHandle,
|
||||
federationList,
|
||||
send_threads, postLog,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
debug,
|
||||
project_version,
|
||||
signingPrivateKeyPem), daemon=True)
|
||||
|
@ -126,7 +126,7 @@ def manualApproveFollowRequest(session, base_dir: str,
|
|||
approveHandle: str,
|
||||
federationList: [],
|
||||
send_threads: [], postLog: [],
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool,
|
||||
project_version: str,
|
||||
signingPrivateKeyPem: str) -> None:
|
||||
|
@ -215,7 +215,7 @@ def manualApproveFollowRequest(session, base_dir: str,
|
|||
federationList,
|
||||
followJson,
|
||||
send_threads, postLog,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
debug,
|
||||
project_version, False,
|
||||
|
@ -283,7 +283,7 @@ def manualApproveFollowRequestThread(session, base_dir: str,
|
|||
approveHandle: str,
|
||||
federationList: [],
|
||||
send_threads: [], postLog: [],
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool,
|
||||
project_version: str,
|
||||
signingPrivateKeyPem: str) -> None:
|
||||
|
@ -298,7 +298,7 @@ def manualApproveFollowRequestThread(session, base_dir: str,
|
|||
approveHandle,
|
||||
federationList,
|
||||
send_threads, postLog,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
debug,
|
||||
project_version,
|
||||
signingPrivateKeyPem), daemon=True)
|
||||
|
|
12
migrate.py
12
migrate.py
|
@ -22,7 +22,7 @@ from person import getActorJson
|
|||
|
||||
def _moveFollowingHandlesForAccount(base_dir: str, nickname: str, domain: str,
|
||||
session,
|
||||
http_prefix: str, cachedWebfingers: {},
|
||||
http_prefix: str, cached_webfingers: {},
|
||||
debug: bool,
|
||||
signingPrivateKeyPem: str) -> int:
|
||||
"""Goes through all follows for an account and updates any that have moved
|
||||
|
@ -38,14 +38,14 @@ def _moveFollowingHandlesForAccount(base_dir: str, nickname: str, domain: str,
|
|||
ctr += \
|
||||
_updateMovedHandle(base_dir, nickname, domain,
|
||||
followHandle, session,
|
||||
http_prefix, cachedWebfingers,
|
||||
http_prefix, cached_webfingers,
|
||||
debug, signingPrivateKeyPem)
|
||||
return ctr
|
||||
|
||||
|
||||
def _updateMovedHandle(base_dir: str, nickname: str, domain: str,
|
||||
handle: str, session,
|
||||
http_prefix: str, cachedWebfingers: {},
|
||||
http_prefix: str, cached_webfingers: {},
|
||||
debug: bool, signingPrivateKeyPem: str) -> int:
|
||||
"""Check if an account has moved, and if so then alter following.txt
|
||||
for each account.
|
||||
|
@ -59,7 +59,7 @@ def _updateMovedHandle(base_dir: str, nickname: str, domain: str,
|
|||
if handle.startswith('@'):
|
||||
handle = handle[1:]
|
||||
wfRequest = webfingerHandle(session, handle,
|
||||
http_prefix, cachedWebfingers,
|
||||
http_prefix, cached_webfingers,
|
||||
domain, __version__, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
@ -174,7 +174,7 @@ def _updateMovedHandle(base_dir: str, nickname: str, domain: str,
|
|||
|
||||
|
||||
def migrateAccounts(base_dir: str, session,
|
||||
http_prefix: str, cachedWebfingers: {},
|
||||
http_prefix: str, cached_webfingers: {},
|
||||
debug: bool, signingPrivateKeyPem: str) -> int:
|
||||
"""If followed accounts change then this modifies the
|
||||
following lists for each account accordingly.
|
||||
|
@ -191,7 +191,7 @@ def migrateAccounts(base_dir: str, session,
|
|||
ctr += \
|
||||
_moveFollowingHandlesForAccount(base_dir, nickname, domain,
|
||||
session, http_prefix,
|
||||
cachedWebfingers, debug,
|
||||
cached_webfingers, debug,
|
||||
signingPrivateKeyPem)
|
||||
break
|
||||
return ctr
|
||||
|
|
|
@ -377,7 +377,7 @@ def _newswireHashtagProcessing(session, base_dir: str, post_json_object: {},
|
|||
hashtags: [], http_prefix: str,
|
||||
domain: str, port: int,
|
||||
person_cache: {},
|
||||
cachedWebfingers: {},
|
||||
cached_webfingers: {},
|
||||
federationList: [],
|
||||
send_threads: [], postLog: [],
|
||||
moderated: bool, url: str,
|
||||
|
@ -538,7 +538,7 @@ def _convertRSStoActivityPub(base_dir: str, http_prefix: str,
|
|||
newswire: {},
|
||||
translate: {},
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
session, cachedWebfingers: {},
|
||||
session, cached_webfingers: {},
|
||||
person_cache: {},
|
||||
federationList: [],
|
||||
send_threads: [], postLog: [],
|
||||
|
@ -682,7 +682,7 @@ def _convertRSStoActivityPub(base_dir: str, http_prefix: str,
|
|||
savePost = _newswireHashtagProcessing(session, base_dir,
|
||||
blog, hashtags,
|
||||
http_prefix, domain, port,
|
||||
person_cache, cachedWebfingers,
|
||||
person_cache, cached_webfingers,
|
||||
federationList,
|
||||
send_threads, postLog,
|
||||
moderated, url, systemLanguage,
|
||||
|
@ -828,7 +828,7 @@ def runNewswireDaemon(base_dir: str, httpd,
|
|||
httpd.recentPostsCache,
|
||||
httpd.max_recent_posts,
|
||||
httpd.session,
|
||||
httpd.cachedWebfingers,
|
||||
httpd.cached_webfingers,
|
||||
httpd.person_cache,
|
||||
httpd.federationList,
|
||||
httpd.send_threads,
|
||||
|
|
|
@ -184,7 +184,7 @@ def postMessageToOutbox(session, translate: {},
|
|||
onion_domain: str, i2p_domain: str, port: int,
|
||||
recentPostsCache: {}, followersThreads: [],
|
||||
federationList: [], send_threads: [],
|
||||
postLog: [], cachedWebfingers: {},
|
||||
postLog: [], cached_webfingers: {},
|
||||
person_cache: {}, allow_deletion: bool,
|
||||
proxy_type: str, version: str, debug: bool,
|
||||
yt_replace_domain: str,
|
||||
|
@ -457,7 +457,7 @@ def postMessageToOutbox(session, translate: {},
|
|||
max_recent_posts,
|
||||
translate, pageNumber,
|
||||
base_dir, session,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
postToNickname, domain, port,
|
||||
messageJson, None, True,
|
||||
|
@ -517,7 +517,7 @@ def postMessageToOutbox(session, translate: {},
|
|||
federationList,
|
||||
send_threads,
|
||||
postLog,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
messageJson, debug,
|
||||
version,
|
||||
|
@ -658,7 +658,7 @@ def postMessageToOutbox(session, translate: {},
|
|||
federationList,
|
||||
send_threads,
|
||||
postLog,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
messageJson, debug,
|
||||
version,
|
||||
|
|
|
@ -1497,7 +1497,7 @@ def getActorJson(hostDomain: str, handle: str, http: bool, gnunet: bool,
|
|||
domain = handle.split('@')[1]
|
||||
domain = domain.replace('\n', '').replace('\r', '')
|
||||
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
proxy_type = None
|
||||
if http or domain.endswith('.onion'):
|
||||
http_prefix = 'http'
|
||||
|
@ -1535,7 +1535,7 @@ def getActorJson(hostDomain: str, handle: str, http: bool, gnunet: bool,
|
|||
else:
|
||||
handle = nickname + '@' + domain
|
||||
wfRequest = webfingerHandle(session, handle,
|
||||
http_prefix, cachedWebfingers,
|
||||
http_prefix, cached_webfingers,
|
||||
hostDomain, __version__, debug,
|
||||
groupAccount, signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
|
4
pgp.py
4
pgp.py
|
@ -456,7 +456,7 @@ def pgpPublicKeyUpload(base_dir: str, session,
|
|||
nickname: str, password: str,
|
||||
domain: str, port: int,
|
||||
http_prefix: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, test: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
if debug:
|
||||
|
@ -557,7 +557,7 @@ def pgpPublicKeyUpload(base_dir: str, session,
|
|||
|
||||
# lookup the inbox for the To handle
|
||||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix, cachedWebfingers,
|
||||
webfingerHandle(session, handle, http_prefix, cached_webfingers,
|
||||
domain, __version__, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
|
59
posts.py
59
posts.py
|
@ -2272,7 +2272,7 @@ def sendPost(signingPrivateKeyPem: str, project_version: str,
|
|||
attachImageFilename: str, mediaType: str,
|
||||
imageDescription: str, city: str,
|
||||
federationList: [], send_threads: [], postLog: [],
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
isArticle: bool, systemLanguage: str,
|
||||
shared_items_federated_domains: [],
|
||||
sharedItemFederationTokens: {},
|
||||
|
@ -2294,7 +2294,7 @@ def sendPost(signingPrivateKeyPem: str, project_version: str,
|
|||
|
||||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
domain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
@ -2422,7 +2422,7 @@ def sendPostViaServer(signingPrivateKeyPem: str, project_version: str,
|
|||
commentsEnabled: bool,
|
||||
attachImageFilename: str, mediaType: str,
|
||||
imageDescription: str, city: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
isArticle: bool, systemLanguage: str,
|
||||
low_bandwidth: bool,
|
||||
content_license_url: str,
|
||||
|
@ -2443,7 +2443,7 @@ def sendPostViaServer(signingPrivateKeyPem: str, project_version: str,
|
|||
|
||||
# lookup the inbox for the To handle
|
||||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix, cachedWebfingers,
|
||||
webfingerHandle(session, handle, http_prefix, cached_webfingers,
|
||||
fromDomainFull, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
@ -2613,7 +2613,7 @@ def sendSignedJson(post_json_object: {}, session, base_dir: str,
|
|||
toNickname: str, toDomain: str, toPort: int, cc: str,
|
||||
http_prefix: str, saveToFile: bool, client_to_server: bool,
|
||||
federationList: [],
|
||||
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||
send_threads: [], postLog: [], cached_webfingers: {},
|
||||
person_cache: {}, debug: bool, project_version: str,
|
||||
sharedItemsToken: str, groupAccount: bool,
|
||||
signingPrivateKeyPem: str,
|
||||
|
@ -2652,7 +2652,8 @@ def sendSignedJson(post_json_object: {}, session, base_dir: str,
|
|||
print('DEBUG: handle - ' + handle + ' toPort ' + str(toPort))
|
||||
|
||||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix, cachedWebfingers,
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cached_webfingers,
|
||||
domain, project_version, debug, groupAccount,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
@ -2862,7 +2863,7 @@ def _sendToNamedAddresses(session, base_dir: str,
|
|||
onion_domain: str, i2p_domain: str, port: int,
|
||||
http_prefix: str, federationList: [],
|
||||
send_threads: [], postLog: [],
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
post_json_object: {}, debug: bool,
|
||||
project_version: str,
|
||||
shared_items_federated_domains: [],
|
||||
|
@ -3004,7 +3005,7 @@ def _sendToNamedAddresses(session, base_dir: str,
|
|||
toNickname, toDomain, toPort,
|
||||
cc, fromHttpPrefix, True, client_to_server,
|
||||
federationList,
|
||||
send_threads, postLog, cachedWebfingers,
|
||||
send_threads, postLog, cached_webfingers,
|
||||
person_cache, debug, project_version,
|
||||
sharedItemsToken, groupAccount,
|
||||
signingPrivateKeyPem, 34436782)
|
||||
|
@ -3015,7 +3016,7 @@ def sendToNamedAddressesThread(session, base_dir: str,
|
|||
onion_domain: str, i2p_domain: str, port: int,
|
||||
http_prefix: str, federationList: [],
|
||||
send_threads: [], postLog: [],
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
post_json_object: {}, debug: bool,
|
||||
project_version: str,
|
||||
shared_items_federated_domains: [],
|
||||
|
@ -3030,7 +3031,7 @@ def sendToNamedAddressesThread(session, base_dir: str,
|
|||
onion_domain, i2p_domain, port,
|
||||
http_prefix, federationList,
|
||||
send_threads, postLog,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
post_json_object, debug,
|
||||
project_version,
|
||||
shared_items_federated_domains,
|
||||
|
@ -3091,7 +3092,7 @@ def sendToFollowers(session, base_dir: str,
|
|||
onion_domain: str, i2p_domain: str, port: int,
|
||||
http_prefix: str, federationList: [],
|
||||
send_threads: [], postLog: [],
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
post_json_object: {}, debug: bool,
|
||||
project_version: str,
|
||||
shared_items_federated_domains: [],
|
||||
|
@ -3214,7 +3215,7 @@ def sendToFollowers(session, base_dir: str,
|
|||
toNickname, toDomain, toPort,
|
||||
cc, fromHttpPrefix, True, client_to_server,
|
||||
federationList,
|
||||
send_threads, postLog, cachedWebfingers,
|
||||
send_threads, postLog, cached_webfingers,
|
||||
person_cache, debug, project_version,
|
||||
sharedItemsToken, groupAccount,
|
||||
signingPrivateKeyPem, 639342)
|
||||
|
@ -3243,7 +3244,7 @@ def sendToFollowers(session, base_dir: str,
|
|||
toNickname, toDomain, toPort,
|
||||
cc, fromHttpPrefix, True, client_to_server,
|
||||
federationList,
|
||||
send_threads, postLog, cachedWebfingers,
|
||||
send_threads, postLog, cached_webfingers,
|
||||
person_cache, debug, project_version,
|
||||
sharedItemsToken, groupAccount,
|
||||
signingPrivateKeyPem, 634219)
|
||||
|
@ -3264,7 +3265,7 @@ def sendToFollowersThread(session, base_dir: str,
|
|||
onion_domain: str, i2p_domain: str, port: int,
|
||||
http_prefix: str, federationList: [],
|
||||
send_threads: [], postLog: [],
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
post_json_object: {}, debug: bool,
|
||||
project_version: str,
|
||||
shared_items_federated_domains: [],
|
||||
|
@ -3279,7 +3280,7 @@ def sendToFollowersThread(session, base_dir: str,
|
|||
onion_domain, i2p_domain, port,
|
||||
http_prefix, federationList,
|
||||
send_threads, postLog,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
post_json_object.copy(), debug,
|
||||
project_version,
|
||||
shared_items_federated_domains,
|
||||
|
@ -4079,7 +4080,7 @@ def getPublicPostsOfPerson(base_dir: str, nickname: str, domain: str,
|
|||
print('Session was not created')
|
||||
return
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
federationList = []
|
||||
groupAccount = False
|
||||
if nickname.startswith('!'):
|
||||
|
@ -4089,7 +4090,7 @@ def getPublicPostsOfPerson(base_dir: str, nickname: str, domain: str,
|
|||
handle = http_prefix + "://" + domainFull + "/@" + nickname
|
||||
|
||||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix, cachedWebfingers,
|
||||
webfingerHandle(session, handle, http_prefix, cached_webfingers,
|
||||
originDomain, project_version, debug, groupAccount,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
@ -4140,13 +4141,13 @@ def getPublicPostDomains(session, base_dir: str, nickname: str, domain: str,
|
|||
if not session:
|
||||
return domainList
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
federationList = []
|
||||
|
||||
domainFull = getFullDomain(domain, port)
|
||||
handle = http_prefix + "://" + domainFull + "/@" + nickname
|
||||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix, cachedWebfingers,
|
||||
webfingerHandle(session, handle, http_prefix, cached_webfingers,
|
||||
domain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
@ -4236,13 +4237,13 @@ def getPublicPostInfo(session, base_dir: str, nickname: str, domain: str,
|
|||
if not session:
|
||||
return {}
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
federationList = []
|
||||
|
||||
domainFull = getFullDomain(domain, port)
|
||||
handle = http_prefix + "://" + domainFull + "/@" + nickname
|
||||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix, cachedWebfingers,
|
||||
webfingerHandle(session, handle, http_prefix, cached_webfingers,
|
||||
domain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
@ -4758,7 +4759,7 @@ def sendBlockViaServer(base_dir: str, session,
|
|||
fromNickname: str, password: str,
|
||||
fromDomain: str, fromPort: int,
|
||||
http_prefix: str, blockedUrl: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates a block via c2s
|
||||
|
@ -4786,7 +4787,7 @@ def sendBlockViaServer(base_dir: str, session,
|
|||
|
||||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
@ -4842,7 +4843,7 @@ def sendMuteViaServer(base_dir: str, session,
|
|||
fromNickname: str, password: str,
|
||||
fromDomain: str, fromPort: int,
|
||||
http_prefix: str, mutedUrl: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates a mute via c2s
|
||||
|
@ -4866,7 +4867,7 @@ def sendMuteViaServer(base_dir: str, session,
|
|||
|
||||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
@ -4922,7 +4923,7 @@ def sendUndoMuteViaServer(base_dir: str, session,
|
|||
fromNickname: str, password: str,
|
||||
fromDomain: str, fromPort: int,
|
||||
http_prefix: str, mutedUrl: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Undoes a mute via c2s
|
||||
|
@ -4951,7 +4952,7 @@ def sendUndoMuteViaServer(base_dir: str, session,
|
|||
|
||||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
@ -5008,7 +5009,7 @@ def sendUndoBlockViaServer(base_dir: str, session,
|
|||
fromNickname: str, password: str,
|
||||
fromDomain: str, fromPort: int,
|
||||
http_prefix: str, blockedUrl: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates a block via c2s
|
||||
|
@ -5040,7 +5041,7 @@ def sendUndoBlockViaServer(base_dir: str, session,
|
|||
|
||||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
|
16
reaction.py
16
reaction.py
|
@ -68,7 +68,7 @@ def _reaction(recentPostsCache: {},
|
|||
actorReaction: str,
|
||||
client_to_server: bool,
|
||||
send_threads: [], postLog: [],
|
||||
person_cache: {}, cachedWebfingers: {},
|
||||
person_cache: {}, cached_webfingers: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates an emoji reaction
|
||||
|
@ -138,7 +138,7 @@ def _reaction(recentPostsCache: {},
|
|||
reactionPostDomain, reactionPostPort,
|
||||
'https://www.w3.org/ns/activitystreams#Public',
|
||||
http_prefix, True, client_to_server, federationList,
|
||||
send_threads, postLog, cachedWebfingers, person_cache,
|
||||
send_threads, postLog, cached_webfingers, person_cache,
|
||||
debug, project_version, None, groupAccount,
|
||||
signingPrivateKeyPem, 7165392)
|
||||
|
||||
|
@ -153,7 +153,7 @@ def reactionPost(recentPostsCache: {},
|
|||
reactionStatusNumber: int, emojiContent: str,
|
||||
client_to_server: bool,
|
||||
send_threads: [], postLog: [],
|
||||
person_cache: {}, cachedWebfingers: {},
|
||||
person_cache: {}, cached_webfingers: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Adds a reaction to a given status post. This is only used by unit tests
|
||||
|
@ -169,7 +169,7 @@ def reactionPost(recentPostsCache: {},
|
|||
nickname, domain, port,
|
||||
ccList, http_prefix, objectUrl, emojiContent,
|
||||
actorReaction, client_to_server,
|
||||
send_threads, postLog, person_cache, cachedWebfingers,
|
||||
send_threads, postLog, person_cache, cached_webfingers,
|
||||
debug, project_version, signingPrivateKeyPem)
|
||||
|
||||
|
||||
|
@ -178,7 +178,7 @@ def sendReactionViaServer(base_dir: str, session,
|
|||
fromDomain: str, fromPort: int,
|
||||
http_prefix: str, reactionUrl: str,
|
||||
emojiContent: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Creates a reaction via c2s
|
||||
|
@ -207,7 +207,7 @@ def sendReactionViaServer(base_dir: str, session,
|
|||
|
||||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
@ -268,7 +268,7 @@ def sendUndoReactionViaServer(base_dir: str, session,
|
|||
fromDomain: str, fromPort: int,
|
||||
http_prefix: str, reactionUrl: str,
|
||||
emojiContent: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Undo a reaction via c2s
|
||||
|
@ -297,7 +297,7 @@ def sendUndoReactionViaServer(base_dir: str, session,
|
|||
|
||||
# lookup the inbox for the To handle
|
||||
wfRequest = webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
|
|
@ -108,7 +108,7 @@ def _updatePostSchedule(base_dir: str, handle: str, httpd,
|
|||
httpd.federationList,
|
||||
httpd.send_threads,
|
||||
httpd.postLog,
|
||||
httpd.cachedWebfingers,
|
||||
httpd.cached_webfingers,
|
||||
httpd.person_cache,
|
||||
httpd.allow_deletion,
|
||||
httpd.proxy_type,
|
||||
|
|
16
shares.py
16
shares.py
|
@ -558,7 +558,7 @@ def sendShareViaServer(base_dir, session,
|
|||
summary: str, imageFilename: str,
|
||||
itemQty: float, itemType: str, itemCategory: str,
|
||||
location: str, duration: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
itemPrice: str, itemCurrency: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
|
@ -610,7 +610,7 @@ def sendShareViaServer(base_dir, session,
|
|||
# lookup the inbox for the To handle
|
||||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
@ -680,7 +680,7 @@ def sendUndoShareViaServer(base_dir: str, session,
|
|||
fromNickname: str, password: str,
|
||||
fromDomain: str, fromPort: int,
|
||||
http_prefix: str, displayName: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Undoes a share via c2s
|
||||
|
@ -714,7 +714,7 @@ def sendUndoShareViaServer(base_dir: str, session,
|
|||
|
||||
# lookup the inbox for the To handle
|
||||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix, cachedWebfingers,
|
||||
webfingerHandle(session, handle, http_prefix, cached_webfingers,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
@ -778,7 +778,7 @@ def sendWantedViaServer(base_dir, session,
|
|||
summary: str, imageFilename: str,
|
||||
itemQty: float, itemType: str, itemCategory: str,
|
||||
location: str, duration: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
itemMaxPrice: str, itemCurrency: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
|
@ -830,7 +830,7 @@ def sendWantedViaServer(base_dir, session,
|
|||
# lookup the inbox for the To handle
|
||||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
@ -900,7 +900,7 @@ def sendUndoWantedViaServer(base_dir: str, session,
|
|||
fromNickname: str, password: str,
|
||||
fromDomain: str, fromPort: int,
|
||||
http_prefix: str, displayName: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Undoes a wanted item via c2s
|
||||
|
@ -934,7 +934,7 @@ def sendUndoWantedViaServer(base_dir: str, session,
|
|||
|
||||
# lookup the inbox for the To handle
|
||||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix, cachedWebfingers,
|
||||
webfingerHandle(session, handle, http_prefix, cached_webfingers,
|
||||
fromDomain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
|
|
@ -176,7 +176,7 @@ def sendSkillViaServer(base_dir: str, session, nickname: str, password: str,
|
|||
domain: str, port: int,
|
||||
http_prefix: str,
|
||||
skill: str, skillLevelPercent: int,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
"""Sets a skill for a person via c2s
|
||||
|
@ -209,7 +209,7 @@ def sendSkillViaServer(base_dir: str, session, nickname: str, password: str,
|
|||
# lookup the inbox for the To handle
|
||||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
domain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
|
|
@ -32,7 +32,7 @@ def instancesGraph(base_dir: str, handles: str,
|
|||
return dotGraphStr + '}\n'
|
||||
|
||||
person_cache = {}
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
federationList = []
|
||||
max_mentions = 99
|
||||
max_emoji = 99
|
||||
|
@ -53,7 +53,7 @@ def instancesGraph(base_dir: str, handles: str,
|
|||
handle = http_prefix + "://" + domainFull + "/@" + nickname
|
||||
wfRequest = \
|
||||
webfingerHandle(session, handle, http_prefix,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
domain, project_version, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
if not wfRequest:
|
||||
|
|
22
tests.py
22
tests.py
|
@ -2863,7 +2863,7 @@ def testClientToServer(base_dir: str):
|
|||
attachedImageDescription = 'Logo'
|
||||
city = 'London, England'
|
||||
isArticle = False
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
person_cache = {}
|
||||
password = 'alicepass'
|
||||
conversationId = None
|
||||
|
@ -2896,7 +2896,7 @@ def testClientToServer(base_dir: str):
|
|||
followersOnly, True,
|
||||
attachedImageFilename, mediaType,
|
||||
attachedImageDescription, city,
|
||||
cachedWebfingers, person_cache, isArticle,
|
||||
cached_webfingers, person_cache, isArticle,
|
||||
systemLanguage, low_bandwidth,
|
||||
content_license_url,
|
||||
True, None, None,
|
||||
|
@ -2960,7 +2960,7 @@ def testClientToServer(base_dir: str):
|
|||
aliceDomain, alicePort,
|
||||
'bob', bobDomain, bobPort,
|
||||
http_prefix,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
True, __version__, signingPrivateKeyPem)
|
||||
alicePetnamesFilename = aliceDir + '/accounts/' + \
|
||||
'alice@' + aliceDomain + '/petnames.txt'
|
||||
|
@ -3002,7 +3002,7 @@ def testClientToServer(base_dir: str):
|
|||
bobDomain, bobPort,
|
||||
'alice', aliceDomain, alicePort,
|
||||
http_prefix,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
True, __version__, signingPrivateKeyPem)
|
||||
for t in range(10):
|
||||
if os.path.isfile(aliceDir + '/accounts/alice@' + aliceDomain +
|
||||
|
@ -3057,7 +3057,7 @@ def testClientToServer(base_dir: str):
|
|||
'bob', 'bobpass',
|
||||
bobDomain, bobPort,
|
||||
http_prefix, outboxPostId,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
True, __version__, signingPrivateKeyPem)
|
||||
for i in range(20):
|
||||
if os.path.isdir(outboxPath) and os.path.isdir(inboxPath):
|
||||
|
@ -3087,7 +3087,7 @@ def testClientToServer(base_dir: str):
|
|||
'bob', 'bobpass',
|
||||
bobDomain, bobPort,
|
||||
http_prefix, outboxPostId, '😃',
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
True, __version__, signingPrivateKeyPem)
|
||||
for i in range(20):
|
||||
if os.path.isdir(outboxPath) and os.path.isdir(inboxPath):
|
||||
|
@ -3133,7 +3133,7 @@ def testClientToServer(base_dir: str):
|
|||
sendAnnounceViaServer(bobDir, sessionBob, 'bob', password,
|
||||
bobDomain, bobPort,
|
||||
http_prefix, outboxPostId,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache, True, __version__,
|
||||
signingPrivateKeyPem)
|
||||
for i in range(20):
|
||||
|
@ -3171,7 +3171,7 @@ def testClientToServer(base_dir: str):
|
|||
sendDeleteViaServer(aliceDir, sessionAlice, 'alice', password,
|
||||
aliceDomain, alicePort,
|
||||
http_prefix, outboxPostId,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
True, __version__, signingPrivateKeyPem)
|
||||
for i in range(30):
|
||||
if os.path.isdir(inboxPath):
|
||||
|
@ -3196,7 +3196,7 @@ def testClientToServer(base_dir: str):
|
|||
aliceDomain, alicePort,
|
||||
'bob', bobDomain, bobPort,
|
||||
http_prefix,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
True, __version__, signingPrivateKeyPem)
|
||||
for t in range(10):
|
||||
if 'alice@' + aliceDomain + ':' + str(alicePort) not in \
|
||||
|
@ -5112,7 +5112,7 @@ def testUpdateActor(base_dir: str):
|
|||
print('Alice updates her PGP key')
|
||||
|
||||
sessionAlice = createSession(proxy_type)
|
||||
cachedWebfingers = {}
|
||||
cached_webfingers = {}
|
||||
person_cache = {}
|
||||
password = 'alicepass'
|
||||
outboxPath = aliceDir + '/accounts/alice@' + aliceDomain + '/outbox'
|
||||
|
@ -5147,7 +5147,7 @@ def testUpdateActor(base_dir: str):
|
|||
'alice', password,
|
||||
aliceDomain, alicePort,
|
||||
http_prefix,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
True, pubKey, signingPrivateKeyPem)
|
||||
print('actor update result: ' + str(actorUpdate))
|
||||
assert actorUpdate
|
||||
|
|
|
@ -28,7 +28,7 @@ def htmlConfirmDelete(cssCache: {},
|
|||
translate, pageNumber: int,
|
||||
session, base_dir: str, messageId: str,
|
||||
http_prefix: str, project_version: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
callingDomain: str,
|
||||
yt_replace_domain: str,
|
||||
twitter_replacement_domain: str,
|
||||
|
@ -68,7 +68,8 @@ def htmlConfirmDelete(cssCache: {},
|
|||
individualPostAsHtml(signingPrivateKeyPem,
|
||||
True, recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
base_dir, session, cachedWebfingers, person_cache,
|
||||
base_dir, session,
|
||||
cached_webfingers, person_cache,
|
||||
nickname, domain, port, post_json_object,
|
||||
None, True, False,
|
||||
http_prefix, project_version, 'outbox',
|
||||
|
|
|
@ -198,7 +198,7 @@ def htmlNewPost(cssCache: {}, media_instance: bool, translate: {},
|
|||
accessKeys: {}, customSubmitText: str,
|
||||
conversationId: str,
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
session, cachedWebfingers: {},
|
||||
session, cached_webfingers: {},
|
||||
person_cache: {}, port: int,
|
||||
post_json_object: {},
|
||||
project_version: str,
|
||||
|
@ -264,7 +264,7 @@ def htmlNewPost(cssCache: {}, media_instance: bool, translate: {},
|
|||
max_recent_posts,
|
||||
translate, None,
|
||||
base_dir, session,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
nickname, domain, port,
|
||||
post_json_object,
|
||||
|
|
|
@ -26,7 +26,7 @@ def _htmlFrontScreenPosts(recentPostsCache: {}, max_recent_posts: int,
|
|||
translate: {},
|
||||
base_dir: str, http_prefix: str,
|
||||
nickname: str, domain: str, port: int,
|
||||
session, cachedWebfingers: {}, person_cache: {},
|
||||
session, cached_webfingers: {}, person_cache: {},
|
||||
project_version: str,
|
||||
yt_replace_domain: str,
|
||||
twitter_replacement_domain: str,
|
||||
|
@ -69,7 +69,7 @@ def _htmlFrontScreenPosts(recentPostsCache: {}, max_recent_posts: int,
|
|||
max_recent_posts,
|
||||
translate, None,
|
||||
base_dir, session,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
nickname, domain, port, item,
|
||||
None, True, False,
|
||||
|
@ -101,7 +101,7 @@ def htmlFrontScreen(signingPrivateKeyPem: str,
|
|||
translate: {}, project_version: str,
|
||||
base_dir: str, http_prefix: str, authorized: bool,
|
||||
profileJson: {}, selected: str,
|
||||
session, cachedWebfingers: {}, person_cache: {},
|
||||
session, cached_webfingers: {}, person_cache: {},
|
||||
yt_replace_domain: str,
|
||||
twitter_replacement_domain: str,
|
||||
show_published_date_only: bool,
|
||||
|
@ -177,7 +177,7 @@ def htmlFrontScreen(signingPrivateKeyPem: str,
|
|||
translate,
|
||||
base_dir, http_prefix,
|
||||
nickname, domain, port,
|
||||
session, cachedWebfingers, person_cache,
|
||||
session, cached_webfingers, person_cache,
|
||||
project_version,
|
||||
yt_replace_domain,
|
||||
twitter_replacement_domain,
|
||||
|
|
|
@ -1324,7 +1324,7 @@ def individualPostAsHtml(signingPrivateKeyPem: str,
|
|||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {},
|
||||
pageNumber: int, base_dir: str,
|
||||
session, cachedWebfingers: {}, person_cache: {},
|
||||
session, cached_webfingers: {}, person_cache: {},
|
||||
nickname: str, domain: str, port: int,
|
||||
post_json_object: {},
|
||||
avatarUrl: str, showAvatarOptions: bool,
|
||||
|
@ -1430,7 +1430,7 @@ def individualPostAsHtml(signingPrivateKeyPem: str,
|
|||
postActorHandle = postActorNickname + '@' + postActorDomainFull
|
||||
postActorWf = \
|
||||
webfingerHandle(session, postActorHandle, http_prefix,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
domain, __version__, False, False,
|
||||
signingPrivateKeyPem)
|
||||
|
||||
|
@ -1993,7 +1993,7 @@ def individualPostAsHtml(signingPrivateKeyPem: str,
|
|||
def htmlIndividualPost(cssCache: {},
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {},
|
||||
base_dir: str, session, cachedWebfingers: {},
|
||||
base_dir: str, session, cached_webfingers: {},
|
||||
person_cache: {},
|
||||
nickname: str, domain: str, port: int, authorized: bool,
|
||||
post_json_object: {}, http_prefix: str,
|
||||
|
@ -2060,7 +2060,8 @@ def htmlIndividualPost(cssCache: {},
|
|||
individualPostAsHtml(signingPrivateKeyPem,
|
||||
True, recentPostsCache, max_recent_posts,
|
||||
translate, None,
|
||||
base_dir, session, cachedWebfingers, person_cache,
|
||||
base_dir, session,
|
||||
cached_webfingers, person_cache,
|
||||
nickname, domain, port, post_json_object,
|
||||
None, True, False,
|
||||
http_prefix, project_version, 'inbox',
|
||||
|
@ -2089,7 +2090,7 @@ def htmlIndividualPost(cssCache: {},
|
|||
True, recentPostsCache,
|
||||
max_recent_posts,
|
||||
translate, None,
|
||||
base_dir, session, cachedWebfingers,
|
||||
base_dir, session, cached_webfingers,
|
||||
person_cache,
|
||||
nickname, domain, port,
|
||||
post_json_object,
|
||||
|
@ -2125,7 +2126,7 @@ def htmlIndividualPost(cssCache: {},
|
|||
True, recentPostsCache,
|
||||
max_recent_posts,
|
||||
translate, None,
|
||||
base_dir, session, cachedWebfingers,
|
||||
base_dir, session, cached_webfingers,
|
||||
person_cache,
|
||||
nickname, domain, port, item,
|
||||
None, True, False,
|
||||
|
@ -2155,7 +2156,7 @@ def htmlIndividualPost(cssCache: {},
|
|||
def htmlPostReplies(cssCache: {},
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, base_dir: str,
|
||||
session, cachedWebfingers: {}, person_cache: {},
|
||||
session, cached_webfingers: {}, person_cache: {},
|
||||
nickname: str, domain: str, port: int, repliesJson: {},
|
||||
http_prefix: str, project_version: str,
|
||||
yt_replace_domain: str,
|
||||
|
@ -2177,7 +2178,7 @@ def htmlPostReplies(cssCache: {},
|
|||
True, recentPostsCache,
|
||||
max_recent_posts,
|
||||
translate, None,
|
||||
base_dir, session, cachedWebfingers,
|
||||
base_dir, session, cached_webfingers,
|
||||
person_cache,
|
||||
nickname, domain, port, item,
|
||||
None, True, False,
|
||||
|
@ -2206,7 +2207,7 @@ def htmlPostReplies(cssCache: {},
|
|||
def htmlEmojiReactionPicker(cssCache: {},
|
||||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {},
|
||||
base_dir: str, session, cachedWebfingers: {},
|
||||
base_dir: str, session, cached_webfingers: {},
|
||||
person_cache: {},
|
||||
nickname: str, domain: str, port: int,
|
||||
post_json_object: {}, http_prefix: str,
|
||||
|
@ -2229,7 +2230,7 @@ def htmlEmojiReactionPicker(cssCache: {},
|
|||
True, recentPostsCache,
|
||||
max_recent_posts,
|
||||
translate, None,
|
||||
base_dir, session, cachedWebfingers,
|
||||
base_dir, session, cached_webfingers,
|
||||
person_cache,
|
||||
nickname, domain, port, post_json_object,
|
||||
None, True, False,
|
||||
|
|
|
@ -127,7 +127,7 @@ def htmlProfileAfterSearch(cssCache: {},
|
|||
base_dir: str, path: str, http_prefix: str,
|
||||
nickname: str, domain: str, port: int,
|
||||
profileHandle: str,
|
||||
session, cachedWebfingers: {}, person_cache: {},
|
||||
session, cached_webfingers: {}, person_cache: {},
|
||||
debug: bool, project_version: str,
|
||||
yt_replace_domain: str,
|
||||
twitter_replacement_domain: str,
|
||||
|
@ -336,7 +336,7 @@ def htmlProfileAfterSearch(cssCache: {},
|
|||
individualPostAsHtml(signingPrivateKeyPem,
|
||||
True, recentPostsCache, max_recent_posts,
|
||||
translate, None, base_dir,
|
||||
session, cachedWebfingers, person_cache,
|
||||
session, cached_webfingers, person_cache,
|
||||
nickname, domain, port,
|
||||
post_json_object, avatarUrl, False, False,
|
||||
http_prefix, project_version, 'inbox',
|
||||
|
@ -546,7 +546,7 @@ def htmlProfile(signingPrivateKeyPem: str,
|
|||
translate: {}, project_version: str,
|
||||
base_dir: str, http_prefix: str, authorized: bool,
|
||||
profileJson: {}, selected: str,
|
||||
session, cachedWebfingers: {}, person_cache: {},
|
||||
session, cached_webfingers: {}, person_cache: {},
|
||||
yt_replace_domain: str,
|
||||
twitter_replacement_domain: str,
|
||||
show_published_date_only: bool,
|
||||
|
@ -575,7 +575,7 @@ def htmlProfile(signingPrivateKeyPem: str,
|
|||
translate, project_version,
|
||||
base_dir, http_prefix, authorized,
|
||||
profileJson, selected,
|
||||
session, cachedWebfingers, person_cache,
|
||||
session, cached_webfingers, person_cache,
|
||||
yt_replace_domain,
|
||||
twitter_replacement_domain,
|
||||
show_published_date_only,
|
||||
|
@ -956,7 +956,7 @@ def htmlProfile(signingPrivateKeyPem: str,
|
|||
translate,
|
||||
base_dir, http_prefix, authorized,
|
||||
nickname, domain, port,
|
||||
session, cachedWebfingers, person_cache,
|
||||
session, cached_webfingers, person_cache,
|
||||
project_version,
|
||||
yt_replace_domain,
|
||||
twitter_replacement_domain,
|
||||
|
@ -973,7 +973,7 @@ def htmlProfile(signingPrivateKeyPem: str,
|
|||
_htmlProfileFollowing(translate, base_dir, http_prefix,
|
||||
authorized, nickname,
|
||||
domain, port, session,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache, extraJson,
|
||||
project_version, ["unfollow"], selected,
|
||||
usersPath, pageNumber, maxItemsPerPage,
|
||||
|
@ -984,7 +984,7 @@ def htmlProfile(signingPrivateKeyPem: str,
|
|||
_htmlProfileFollowing(translate, base_dir, http_prefix,
|
||||
authorized, nickname,
|
||||
domain, port, session,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache, extraJson,
|
||||
project_version, ["block"],
|
||||
selected, usersPath, pageNumber,
|
||||
|
@ -1026,7 +1026,7 @@ def _htmlProfilePosts(recentPostsCache: {}, max_recent_posts: int,
|
|||
base_dir: str, http_prefix: str,
|
||||
authorized: bool,
|
||||
nickname: str, domain: str, port: int,
|
||||
session, cachedWebfingers: {}, person_cache: {},
|
||||
session, cached_webfingers: {}, person_cache: {},
|
||||
project_version: str,
|
||||
yt_replace_domain: str,
|
||||
twitter_replacement_domain: str,
|
||||
|
@ -1068,7 +1068,7 @@ def _htmlProfilePosts(recentPostsCache: {}, max_recent_posts: int,
|
|||
True, recentPostsCache,
|
||||
max_recent_posts,
|
||||
translate, None,
|
||||
base_dir, session, cachedWebfingers,
|
||||
base_dir, session, cached_webfingers,
|
||||
person_cache,
|
||||
nickname, domain, port, item,
|
||||
None, True, False,
|
||||
|
@ -1095,7 +1095,7 @@ def _htmlProfilePosts(recentPostsCache: {}, max_recent_posts: int,
|
|||
def _htmlProfileFollowing(translate: {}, base_dir: str, http_prefix: str,
|
||||
authorized: bool,
|
||||
nickname: str, domain: str, port: int,
|
||||
session, cachedWebfingers: {}, person_cache: {},
|
||||
session, cached_webfingers: {}, person_cache: {},
|
||||
followingJson: {}, project_version: str,
|
||||
buttons: [],
|
||||
feedName: str, actor: str,
|
||||
|
@ -1131,7 +1131,7 @@ def _htmlProfileFollowing(translate: {}, base_dir: str, http_prefix: str,
|
|||
profileStr += \
|
||||
_individualFollowAsHtml(signingPrivateKeyPem,
|
||||
translate, base_dir, session,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
domain, followingActor,
|
||||
authorized, nickname,
|
||||
http_prefix, project_version, dormant,
|
||||
|
@ -2337,7 +2337,7 @@ def htmlEditProfile(cssCache: {}, translate: {}, base_dir: str, path: str,
|
|||
def _individualFollowAsHtml(signingPrivateKeyPem: str,
|
||||
translate: {},
|
||||
base_dir: str, session,
|
||||
cachedWebfingers: {},
|
||||
cached_webfingers: {},
|
||||
person_cache: {}, domain: str,
|
||||
followUrl: str,
|
||||
authorized: bool,
|
||||
|
@ -2364,7 +2364,7 @@ def _individualFollowAsHtml(signingPrivateKeyPem: str,
|
|||
followUrlHandle = followUrlNickname + '@' + followUrlDomainFull
|
||||
followUrlWf = \
|
||||
webfingerHandle(session, followUrlHandle, http_prefix,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
domain, __version__, debug, False,
|
||||
signingPrivateKeyPem)
|
||||
|
||||
|
|
|
@ -594,7 +594,7 @@ def htmlHistorySearch(cssCache: {}, translate: {}, base_dir: str,
|
|||
recentPostsCache: {},
|
||||
max_recent_posts: int,
|
||||
session,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache: {},
|
||||
port: int,
|
||||
yt_replace_domain: str,
|
||||
|
@ -677,7 +677,7 @@ def htmlHistorySearch(cssCache: {}, translate: {}, base_dir: str,
|
|||
True, recentPostsCache,
|
||||
max_recent_posts,
|
||||
translate, None,
|
||||
base_dir, session, cachedWebfingers,
|
||||
base_dir, session, cached_webfingers,
|
||||
person_cache,
|
||||
nickname, domain, port,
|
||||
post_json_object,
|
||||
|
@ -708,7 +708,7 @@ def htmlHashtagSearch(cssCache: {},
|
|||
translate: {},
|
||||
base_dir: str, hashtag: str, pageNumber: int,
|
||||
postsPerPage: int,
|
||||
session, cachedWebfingers: {}, person_cache: {},
|
||||
session, cached_webfingers: {}, person_cache: {},
|
||||
http_prefix: str, project_version: str,
|
||||
yt_replace_domain: str,
|
||||
twitter_replacement_domain: str,
|
||||
|
@ -859,7 +859,7 @@ def htmlHashtagSearch(cssCache: {},
|
|||
allowDownloads, recentPostsCache,
|
||||
max_recent_posts,
|
||||
translate, None,
|
||||
base_dir, session, cachedWebfingers,
|
||||
base_dir, session, cached_webfingers,
|
||||
person_cache,
|
||||
nickname, domain, port,
|
||||
post_json_object,
|
||||
|
@ -901,7 +901,7 @@ def rssHashtagSearch(nickname: str, domain: str, port: int,
|
|||
translate: {},
|
||||
base_dir: str, hashtag: str,
|
||||
postsPerPage: int,
|
||||
session, cachedWebfingers: {}, person_cache: {},
|
||||
session, cached_webfingers: {}, person_cache: {},
|
||||
http_prefix: str, project_version: str,
|
||||
yt_replace_domain: str,
|
||||
twitter_replacement_domain: str,
|
||||
|
|
|
@ -422,7 +422,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
|||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int,
|
||||
itemsPerPage: int, session, base_dir: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
nickname: str, domain: str, port: int, timelineJson: {},
|
||||
boxName: str, allow_deletion: bool,
|
||||
http_prefix: str, project_version: str,
|
||||
|
@ -899,7 +899,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
|||
max_recent_posts,
|
||||
translate, pageNumber,
|
||||
base_dir, session,
|
||||
cachedWebfingers,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
nickname, domain, port,
|
||||
item, None, True,
|
||||
|
@ -1122,7 +1122,7 @@ def htmlShares(cssCache: {}, defaultTimeline: str,
|
|||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
nickname: str, domain: str, port: int,
|
||||
allow_deletion: bool,
|
||||
http_prefix: str, project_version: str,
|
||||
|
@ -1154,7 +1154,7 @@ def htmlShares(cssCache: {}, defaultTimeline: str,
|
|||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
nickname, domain, port, None,
|
||||
'tlshares', allow_deletion,
|
||||
http_prefix, project_version,
|
||||
|
@ -1180,7 +1180,7 @@ def htmlWanted(cssCache: {}, defaultTimeline: str,
|
|||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
nickname: str, domain: str, port: int,
|
||||
allow_deletion: bool,
|
||||
http_prefix: str, project_version: str,
|
||||
|
@ -1212,7 +1212,7 @@ def htmlWanted(cssCache: {}, defaultTimeline: str,
|
|||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
nickname, domain, port, None,
|
||||
'tlwanted', allow_deletion,
|
||||
http_prefix, project_version,
|
||||
|
@ -1238,7 +1238,7 @@ def htmlInbox(cssCache: {}, defaultTimeline: str,
|
|||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
nickname: str, domain: str, port: int, inboxJson: {},
|
||||
allow_deletion: bool,
|
||||
http_prefix: str, project_version: str,
|
||||
|
@ -1271,7 +1271,7 @@ def htmlInbox(cssCache: {}, defaultTimeline: str,
|
|||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
nickname, domain, port, inboxJson,
|
||||
'inbox', allow_deletion,
|
||||
http_prefix, project_version,
|
||||
|
@ -1297,7 +1297,7 @@ def htmlBookmarks(cssCache: {}, defaultTimeline: str,
|
|||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
nickname: str, domain: str, port: int, bookmarksJson: {},
|
||||
allow_deletion: bool,
|
||||
http_prefix: str, project_version: str,
|
||||
|
@ -1330,7 +1330,7 @@ def htmlBookmarks(cssCache: {}, defaultTimeline: str,
|
|||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
nickname, domain, port, bookmarksJson,
|
||||
'tlbookmarks', allow_deletion,
|
||||
http_prefix, project_version,
|
||||
|
@ -1355,7 +1355,7 @@ def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
|
|||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
nickname: str, domain: str, port: int, inboxJson: {},
|
||||
allow_deletion: bool,
|
||||
http_prefix: str, project_version: str,
|
||||
|
@ -1385,7 +1385,7 @@ def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
|
|||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
nickname, domain, port, inboxJson,
|
||||
'dm', allow_deletion,
|
||||
http_prefix, project_version, False, minimal,
|
||||
|
@ -1409,7 +1409,7 @@ def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
|
|||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
nickname: str, domain: str, port: int, inboxJson: {},
|
||||
allow_deletion: bool,
|
||||
http_prefix: str, project_version: str,
|
||||
|
@ -1439,7 +1439,7 @@ def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
|
|||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
nickname, domain, port, inboxJson, 'tlreplies',
|
||||
allow_deletion, http_prefix, project_version, False,
|
||||
minimal,
|
||||
|
@ -1462,7 +1462,7 @@ def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
|
|||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
nickname: str, domain: str, port: int, inboxJson: {},
|
||||
allow_deletion: bool,
|
||||
http_prefix: str, project_version: str,
|
||||
|
@ -1492,7 +1492,7 @@ def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
|
|||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
nickname, domain, port, inboxJson, 'tlmedia',
|
||||
allow_deletion, http_prefix, project_version, False,
|
||||
minimal,
|
||||
|
@ -1515,7 +1515,7 @@ def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
|
|||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
nickname: str, domain: str, port: int, inboxJson: {},
|
||||
allow_deletion: bool,
|
||||
http_prefix: str, project_version: str,
|
||||
|
@ -1545,7 +1545,7 @@ def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
|
|||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
nickname, domain, port, inboxJson, 'tlblogs',
|
||||
allow_deletion, http_prefix, project_version, False,
|
||||
minimal,
|
||||
|
@ -1568,7 +1568,7 @@ def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
|
|||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
nickname: str, domain: str, port: int, inboxJson: {},
|
||||
allow_deletion: bool,
|
||||
http_prefix: str, project_version: str,
|
||||
|
@ -1598,7 +1598,7 @@ def htmlInboxFeatures(cssCache: {}, defaultTimeline: str,
|
|||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
nickname, domain, port, inboxJson, 'tlfeatures',
|
||||
allow_deletion, http_prefix, project_version, False,
|
||||
minimal,
|
||||
|
@ -1621,7 +1621,7 @@ def htmlInboxNews(cssCache: {}, defaultTimeline: str,
|
|||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
nickname: str, domain: str, port: int, inboxJson: {},
|
||||
allow_deletion: bool,
|
||||
http_prefix: str, project_version: str,
|
||||
|
@ -1650,7 +1650,7 @@ def htmlInboxNews(cssCache: {}, defaultTimeline: str,
|
|||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
nickname, domain, port, inboxJson, 'tlnews',
|
||||
allow_deletion, http_prefix, project_version, False,
|
||||
minimal,
|
||||
|
@ -1673,7 +1673,7 @@ def htmlOutbox(cssCache: {}, defaultTimeline: str,
|
|||
recentPostsCache: {}, max_recent_posts: int,
|
||||
translate: {}, pageNumber: int, itemsPerPage: int,
|
||||
session, base_dir: str,
|
||||
cachedWebfingers: {}, person_cache: {},
|
||||
cached_webfingers: {}, person_cache: {},
|
||||
nickname: str, domain: str, port: int, outboxJson: {},
|
||||
allow_deletion: bool,
|
||||
http_prefix: str, project_version: str,
|
||||
|
@ -1705,7 +1705,7 @@ def htmlOutbox(cssCache: {}, defaultTimeline: str,
|
|||
recentPostsCache, max_recent_posts,
|
||||
translate, pageNumber,
|
||||
itemsPerPage, session, base_dir,
|
||||
cachedWebfingers, person_cache,
|
||||
cached_webfingers, person_cache,
|
||||
nickname, domain, port, outboxJson, 'outbox',
|
||||
allow_deletion, http_prefix, project_version,
|
||||
manuallyApproveFollowers, minimal,
|
||||
|
|
10
webfinger.py
10
webfinger.py
|
@ -61,7 +61,7 @@ def _parseHandle(handle: str) -> (str, str, bool):
|
|||
|
||||
|
||||
def webfingerHandle(session, handle: str, http_prefix: str,
|
||||
cachedWebfingers: {},
|
||||
cached_webfingers: {},
|
||||
fromDomain: str, project_version: str,
|
||||
debug: bool, groupAccount: bool,
|
||||
signingPrivateKeyPem: str) -> {}:
|
||||
|
@ -78,7 +78,7 @@ def webfingerHandle(session, handle: str, http_prefix: str,
|
|||
wfDomain = removeDomainPort(domain)
|
||||
|
||||
wfHandle = nickname + '@' + wfDomain
|
||||
wf = getWebfingerFromCache(wfHandle, cachedWebfingers)
|
||||
wf = getWebfingerFromCache(wfHandle, cached_webfingers)
|
||||
if wf:
|
||||
if debug:
|
||||
print('Webfinger from cache: ' + str(wf))
|
||||
|
@ -99,7 +99,7 @@ def webfingerHandle(session, handle: str, http_prefix: str,
|
|||
return None
|
||||
|
||||
if result:
|
||||
storeWebfingerInCache(wfHandle, result, cachedWebfingers)
|
||||
storeWebfingerInCache(wfHandle, result, cached_webfingers)
|
||||
else:
|
||||
if debug:
|
||||
print("WARN: Unable to webfinger " + url + ' ' +
|
||||
|
@ -422,7 +422,7 @@ def _webfingerUpdateFromProfile(wfJson: {}, actorJson: {}) -> bool:
|
|||
|
||||
def webfingerUpdate(base_dir: str, nickname: str, domain: str,
|
||||
onion_domain: str,
|
||||
cachedWebfingers: {}) -> None:
|
||||
cached_webfingers: {}) -> None:
|
||||
handle = nickname + '@' + domain
|
||||
wfSubdir = '/wfendpoints'
|
||||
if not os.path.isdir(base_dir + wfSubdir):
|
||||
|
@ -448,4 +448,4 @@ def webfingerUpdate(base_dir: str, nickname: str, domain: str,
|
|||
|
||||
if _webfingerUpdateFromProfile(wfJson, actorJson):
|
||||
if saveJson(wfJson, filename):
|
||||
storeWebfingerInCache(handle, wfJson, cachedWebfingers)
|
||||
storeWebfingerInCache(handle, wfJson, cached_webfingers)
|
||||
|
|
Loading…
Reference in New Issue