mirror of https://gitlab.com/bashrc2/epicyon
Snake case
parent
b92450770d
commit
8a0855af4c
|
@ -183,7 +183,7 @@ def _acceptFollow(base_dir: str, domain: str, messageJson: {},
|
||||||
|
|
||||||
def receiveAcceptReject(session, base_dir: str,
|
def receiveAcceptReject(session, base_dir: str,
|
||||||
http_prefix: str, domain: str, port: int,
|
http_prefix: str, domain: str, port: int,
|
||||||
sendThreads: [], postLog: [], cachedWebfingers: {},
|
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||||
personCache: {}, messageJson: {}, federationList: [],
|
personCache: {}, messageJson: {}, federationList: [],
|
||||||
debug: bool) -> bool:
|
debug: bool) -> bool:
|
||||||
"""Receives an Accept or Reject within the POST section of HTTPServer
|
"""Receives an Accept or Reject within the POST section of HTTPServer
|
||||||
|
|
|
@ -120,7 +120,7 @@ def createAnnounce(session, base_dir: str, federationList: [],
|
||||||
toUrl: str, ccUrl: str, http_prefix: str,
|
toUrl: str, ccUrl: str, http_prefix: str,
|
||||||
objectUrl: str, saveToFile: bool,
|
objectUrl: str, saveToFile: bool,
|
||||||
client_to_server: bool,
|
client_to_server: bool,
|
||||||
sendThreads: [], postLog: [],
|
send_threads: [], postLog: [],
|
||||||
personCache: {}, cachedWebfingers: {},
|
personCache: {}, cachedWebfingers: {},
|
||||||
debug: bool, project_version: str,
|
debug: bool, project_version: str,
|
||||||
signingPrivateKeyPem: str) -> {}:
|
signingPrivateKeyPem: str) -> {}:
|
||||||
|
@ -179,7 +179,7 @@ def createAnnounce(session, base_dir: str, federationList: [],
|
||||||
nickname, domain, port,
|
nickname, domain, port,
|
||||||
announceNickname, announceDomain, announcePort, None,
|
announceNickname, announceDomain, announcePort, None,
|
||||||
http_prefix, True, client_to_server, federationList,
|
http_prefix, True, client_to_server, federationList,
|
||||||
sendThreads, postLog, cachedWebfingers, personCache,
|
send_threads, postLog, cachedWebfingers, personCache,
|
||||||
debug, project_version, None, groupAccount,
|
debug, project_version, None, groupAccount,
|
||||||
signingPrivateKeyPem, 639633)
|
signingPrivateKeyPem, 639633)
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ def createAnnounce(session, base_dir: str, federationList: [],
|
||||||
def announcePublic(session, base_dir: str, federationList: [],
|
def announcePublic(session, base_dir: str, federationList: [],
|
||||||
nickname: str, domain: str, port: int, http_prefix: str,
|
nickname: str, domain: str, port: int, http_prefix: str,
|
||||||
objectUrl: str, client_to_server: bool,
|
objectUrl: str, client_to_server: bool,
|
||||||
sendThreads: [], postLog: [],
|
send_threads: [], postLog: [],
|
||||||
personCache: {}, cachedWebfingers: {},
|
personCache: {}, cachedWebfingers: {},
|
||||||
debug: bool, project_version: str,
|
debug: bool, project_version: str,
|
||||||
signingPrivateKeyPem: str) -> {}:
|
signingPrivateKeyPem: str) -> {}:
|
||||||
|
@ -203,7 +203,7 @@ def announcePublic(session, base_dir: str, federationList: [],
|
||||||
nickname, domain, port,
|
nickname, domain, port,
|
||||||
toUrl, ccUrl, http_prefix,
|
toUrl, ccUrl, http_prefix,
|
||||||
objectUrl, True, client_to_server,
|
objectUrl, True, client_to_server,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
personCache, cachedWebfingers,
|
personCache, cachedWebfingers,
|
||||||
debug, project_version,
|
debug, project_version,
|
||||||
signingPrivateKeyPem)
|
signingPrivateKeyPem)
|
||||||
|
|
|
@ -252,7 +252,7 @@ def bookmark(recentPostsCache: {},
|
||||||
ccList: [], http_prefix: str,
|
ccList: [], http_prefix: str,
|
||||||
objectUrl: str, actorBookmarked: str,
|
objectUrl: str, actorBookmarked: str,
|
||||||
client_to_server: bool,
|
client_to_server: bool,
|
||||||
sendThreads: [], postLog: [],
|
send_threads: [], postLog: [],
|
||||||
personCache: {}, cachedWebfingers: {},
|
personCache: {}, cachedWebfingers: {},
|
||||||
debug: bool, project_version: str) -> {}:
|
debug: bool, project_version: str) -> {}:
|
||||||
"""Creates a bookmark
|
"""Creates a bookmark
|
||||||
|
@ -311,7 +311,7 @@ def undoBookmark(recentPostsCache: {},
|
||||||
ccList: [], http_prefix: str,
|
ccList: [], http_prefix: str,
|
||||||
objectUrl: str, actorBookmarked: str,
|
objectUrl: str, actorBookmarked: str,
|
||||||
client_to_server: bool,
|
client_to_server: bool,
|
||||||
sendThreads: [], postLog: [],
|
send_threads: [], postLog: [],
|
||||||
personCache: {}, cachedWebfingers: {},
|
personCache: {}, cachedWebfingers: {},
|
||||||
debug: bool, project_version: str) -> {}:
|
debug: bool, project_version: str) -> {}:
|
||||||
"""Removes a bookmark
|
"""Removes a bookmark
|
||||||
|
|
26
daemon.py
26
daemon.py
|
@ -1286,7 +1286,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.recentPostsCache,
|
self.server.recentPostsCache,
|
||||||
self.server.followersThreads,
|
self.server.followersThreads,
|
||||||
self.server.federationList,
|
self.server.federationList,
|
||||||
self.server.sendThreads,
|
self.server.send_threads,
|
||||||
self.server.postLog,
|
self.server.postLog,
|
||||||
self.server.cachedWebfingers,
|
self.server.cachedWebfingers,
|
||||||
self.server.personCache,
|
self.server.personCache,
|
||||||
|
@ -3047,7 +3047,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
followingActor,
|
followingActor,
|
||||||
followingPort, http_prefix,
|
followingPort, http_prefix,
|
||||||
False, self.server.federationList,
|
False, self.server.federationList,
|
||||||
self.server.sendThreads,
|
self.server.send_threads,
|
||||||
self.server.postLog,
|
self.server.postLog,
|
||||||
self.server.cachedWebfingers,
|
self.server.cachedWebfingers,
|
||||||
self.server.personCache, debug,
|
self.server.personCache, debug,
|
||||||
|
@ -7696,7 +7696,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
announceToStr,
|
announceToStr,
|
||||||
None, http_prefix,
|
None, http_prefix,
|
||||||
repeatUrl, False, False,
|
repeatUrl, False, False,
|
||||||
self.server.sendThreads,
|
self.server.send_threads,
|
||||||
self.server.postLog,
|
self.server.postLog,
|
||||||
self.server.personCache,
|
self.server.personCache,
|
||||||
self.server.cachedWebfingers,
|
self.server.cachedWebfingers,
|
||||||
|
@ -7910,7 +7910,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
domain, port,
|
domain, port,
|
||||||
followingHandle,
|
followingHandle,
|
||||||
self.server.federationList,
|
self.server.federationList,
|
||||||
self.server.sendThreads,
|
self.server.send_threads,
|
||||||
self.server.postLog,
|
self.server.postLog,
|
||||||
self.server.cachedWebfingers,
|
self.server.cachedWebfingers,
|
||||||
self.server.personCache,
|
self.server.personCache,
|
||||||
|
@ -8065,7 +8065,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
domain, port,
|
domain, port,
|
||||||
followingHandle,
|
followingHandle,
|
||||||
self.server.federationList,
|
self.server.federationList,
|
||||||
self.server.sendThreads,
|
self.server.send_threads,
|
||||||
self.server.postLog,
|
self.server.postLog,
|
||||||
self.server.cachedWebfingers,
|
self.server.cachedWebfingers,
|
||||||
self.server.personCache,
|
self.server.personCache,
|
||||||
|
@ -8907,7 +8907,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
ccList,
|
ccList,
|
||||||
http_prefix,
|
http_prefix,
|
||||||
bookmarkUrl, bookmarkActor, False,
|
bookmarkUrl, bookmarkActor, False,
|
||||||
self.server.sendThreads,
|
self.server.send_threads,
|
||||||
self.server.postLog,
|
self.server.postLog,
|
||||||
self.server.personCache,
|
self.server.personCache,
|
||||||
self.server.cachedWebfingers,
|
self.server.cachedWebfingers,
|
||||||
|
@ -9033,7 +9033,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
ccList,
|
ccList,
|
||||||
http_prefix,
|
http_prefix,
|
||||||
bookmarkUrl, undoActor, False,
|
bookmarkUrl, undoActor, False,
|
||||||
self.server.sendThreads,
|
self.server.send_threads,
|
||||||
self.server.postLog,
|
self.server.postLog,
|
||||||
self.server.personCache,
|
self.server.personCache,
|
||||||
self.server.cachedWebfingers,
|
self.server.cachedWebfingers,
|
||||||
|
@ -18357,13 +18357,13 @@ class EpicyonServer(ThreadingHTTPServer):
|
||||||
return HTTPServer.handle_error(self, request, client_address)
|
return HTTPServer.handle_error(self, request, client_address)
|
||||||
|
|
||||||
|
|
||||||
def runPostsQueue(base_dir: str, sendThreads: [], debug: bool,
|
def runPostsQueue(base_dir: str, send_threads: [], debug: bool,
|
||||||
timeoutMins: int) -> None:
|
timeoutMins: int) -> None:
|
||||||
"""Manages the threads used to send posts
|
"""Manages the threads used to send posts
|
||||||
"""
|
"""
|
||||||
while True:
|
while True:
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
removeDormantThreads(base_dir, sendThreads, debug, timeoutMins)
|
removeDormantThreads(base_dir, send_threads, debug, timeoutMins)
|
||||||
|
|
||||||
|
|
||||||
def runSharesExpire(versionNumber: str, base_dir: str) -> None:
|
def runSharesExpire(versionNumber: str, base_dir: str) -> None:
|
||||||
|
@ -18482,7 +18482,7 @@ def runDaemon(content_license_url: str,
|
||||||
allow_deletion: bool = False,
|
allow_deletion: bool = False,
|
||||||
debug: bool = False, unit_test: bool = False,
|
debug: bool = False, unit_test: bool = False,
|
||||||
instance_only_skills_search: bool = False,
|
instance_only_skills_search: bool = False,
|
||||||
sendThreads: [] = [],
|
send_threads: [] = [],
|
||||||
manualFollowerApproval: bool = True) -> None:
|
manualFollowerApproval: bool = True) -> None:
|
||||||
if len(domain) == 0:
|
if len(domain) == 0:
|
||||||
domain = 'localhost'
|
domain = 'localhost'
|
||||||
|
@ -18749,7 +18749,7 @@ def runDaemon(content_license_url: str,
|
||||||
httpd.POSTbusy = False
|
httpd.POSTbusy = False
|
||||||
httpd.receivedMessage = False
|
httpd.receivedMessage = False
|
||||||
httpd.inboxQueue = []
|
httpd.inboxQueue = []
|
||||||
httpd.sendThreads = sendThreads
|
httpd.send_threads = send_threads
|
||||||
httpd.postLog = []
|
httpd.postLog = []
|
||||||
httpd.maxQueueLength = 64
|
httpd.maxQueueLength = 64
|
||||||
httpd.allow_deletion = allow_deletion
|
httpd.allow_deletion = allow_deletion
|
||||||
|
@ -18873,7 +18873,7 @@ def runDaemon(content_license_url: str,
|
||||||
print('Creating posts queue')
|
print('Creating posts queue')
|
||||||
httpd.thrPostsQueue = \
|
httpd.thrPostsQueue = \
|
||||||
threadWithTrace(target=runPostsQueue,
|
threadWithTrace(target=runPostsQueue,
|
||||||
args=(base_dir, httpd.sendThreads, debug,
|
args=(base_dir, httpd.send_threads, debug,
|
||||||
httpd.send_threads_timeout_mins), daemon=True)
|
httpd.send_threads_timeout_mins), daemon=True)
|
||||||
if not unit_test:
|
if not unit_test:
|
||||||
httpd.thrPostsWatchdog = \
|
httpd.thrPostsWatchdog = \
|
||||||
|
@ -18921,7 +18921,7 @@ def runDaemon(content_license_url: str,
|
||||||
args=(httpd.recentPostsCache,
|
args=(httpd.recentPostsCache,
|
||||||
httpd.max_recent_posts,
|
httpd.max_recent_posts,
|
||||||
project_version,
|
project_version,
|
||||||
base_dir, http_prefix, httpd.sendThreads,
|
base_dir, http_prefix, httpd.send_threads,
|
||||||
httpd.postLog, httpd.cachedWebfingers,
|
httpd.postLog, httpd.cachedWebfingers,
|
||||||
httpd.personCache, httpd.inboxQueue,
|
httpd.personCache, httpd.inboxQueue,
|
||||||
domain, onion_domain, i2p_domain,
|
domain, onion_domain, i2p_domain,
|
||||||
|
|
10
epicyon.py
10
epicyon.py
|
@ -1182,7 +1182,7 @@ if args.approve:
|
||||||
print('syntax: --approve nick@domain')
|
print('syntax: --approve nick@domain')
|
||||||
sys.exit()
|
sys.exit()
|
||||||
session = createSession(proxy_type)
|
session = createSession(proxy_type)
|
||||||
sendThreads = []
|
send_threads = []
|
||||||
postLog = []
|
postLog = []
|
||||||
cachedWebfingers = {}
|
cachedWebfingers = {}
|
||||||
personCache = {}
|
personCache = {}
|
||||||
|
@ -1196,7 +1196,7 @@ if args.approve:
|
||||||
args.nickname, domain, port,
|
args.nickname, domain, port,
|
||||||
args.approve,
|
args.approve,
|
||||||
federationList,
|
federationList,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
cachedWebfingers, personCache,
|
cachedWebfingers, personCache,
|
||||||
debug, __version__,
|
debug, __version__,
|
||||||
signingPrivateKeyPem)
|
signingPrivateKeyPem)
|
||||||
|
@ -1210,7 +1210,7 @@ if args.deny:
|
||||||
print('syntax: --deny nick@domain')
|
print('syntax: --deny nick@domain')
|
||||||
sys.exit()
|
sys.exit()
|
||||||
session = createSession(proxy_type)
|
session = createSession(proxy_type)
|
||||||
sendThreads = []
|
send_threads = []
|
||||||
postLog = []
|
postLog = []
|
||||||
cachedWebfingers = {}
|
cachedWebfingers = {}
|
||||||
personCache = {}
|
personCache = {}
|
||||||
|
@ -1224,7 +1224,7 @@ if args.deny:
|
||||||
args.nickname, domain, port,
|
args.nickname, domain, port,
|
||||||
args.deny,
|
args.deny,
|
||||||
federationList,
|
federationList,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
cachedWebfingers, personCache,
|
cachedWebfingers, personCache,
|
||||||
debug, __version__,
|
debug, __version__,
|
||||||
signingPrivateKeyPem)
|
signingPrivateKeyPem)
|
||||||
|
@ -1295,7 +1295,7 @@ if args.message:
|
||||||
client_to_server = args.client
|
client_to_server = args.client
|
||||||
attachedImageDescription = args.imageDescription
|
attachedImageDescription = args.imageDescription
|
||||||
city = 'London, England'
|
city = 'London, England'
|
||||||
sendThreads = []
|
send_threads = []
|
||||||
postLog = []
|
postLog = []
|
||||||
personCache = {}
|
personCache = {}
|
||||||
cachedWebfingers = {}
|
cachedWebfingers = {}
|
||||||
|
|
12
follow.py
12
follow.py
|
@ -718,7 +718,7 @@ def followedAccountAccepts(session, base_dir: str, http_prefix: str,
|
||||||
port: int,
|
port: int,
|
||||||
nickname: str, domain: str, fromPort: int,
|
nickname: str, domain: str, fromPort: int,
|
||||||
personUrl: str, federationList: [],
|
personUrl: str, federationList: [],
|
||||||
followJson: {}, sendThreads: [], postLog: [],
|
followJson: {}, send_threads: [], postLog: [],
|
||||||
cachedWebfingers: {}, personCache: {},
|
cachedWebfingers: {}, personCache: {},
|
||||||
debug: bool, project_version: str,
|
debug: bool, project_version: str,
|
||||||
removeFollowActivity: bool,
|
removeFollowActivity: bool,
|
||||||
|
@ -770,7 +770,7 @@ def followedAccountAccepts(session, base_dir: str, http_prefix: str,
|
||||||
nickname, domain, fromPort, '',
|
nickname, domain, fromPort, '',
|
||||||
http_prefix, True, client_to_server,
|
http_prefix, True, client_to_server,
|
||||||
federationList,
|
federationList,
|
||||||
sendThreads, postLog, cachedWebfingers,
|
send_threads, postLog, cachedWebfingers,
|
||||||
personCache, debug, project_version, None,
|
personCache, debug, project_version, None,
|
||||||
groupAccount, signingPrivateKeyPem,
|
groupAccount, signingPrivateKeyPem,
|
||||||
7856837)
|
7856837)
|
||||||
|
@ -781,7 +781,7 @@ def followedAccountRejects(session, base_dir: str, http_prefix: str,
|
||||||
port: int,
|
port: int,
|
||||||
nickname: str, domain: str, fromPort: int,
|
nickname: str, domain: str, fromPort: int,
|
||||||
federationList: [],
|
federationList: [],
|
||||||
sendThreads: [], postLog: [],
|
send_threads: [], postLog: [],
|
||||||
cachedWebfingers: {}, personCache: {},
|
cachedWebfingers: {}, personCache: {},
|
||||||
debug: bool, project_version: str,
|
debug: bool, project_version: str,
|
||||||
signingPrivateKeyPem: str):
|
signingPrivateKeyPem: str):
|
||||||
|
@ -838,7 +838,7 @@ def followedAccountRejects(session, base_dir: str, http_prefix: str,
|
||||||
nickname, domain, fromPort, '',
|
nickname, domain, fromPort, '',
|
||||||
http_prefix, True, client_to_server,
|
http_prefix, True, client_to_server,
|
||||||
federationList,
|
federationList,
|
||||||
sendThreads, postLog, cachedWebfingers,
|
send_threads, postLog, cachedWebfingers,
|
||||||
personCache, debug, project_version, None,
|
personCache, debug, project_version, None,
|
||||||
groupAccount, signingPrivateKeyPem,
|
groupAccount, signingPrivateKeyPem,
|
||||||
6393063)
|
6393063)
|
||||||
|
@ -850,7 +850,7 @@ def sendFollowRequest(session, base_dir: str,
|
||||||
followedActor: str,
|
followedActor: str,
|
||||||
followPort: int, followHttpPrefix: str,
|
followPort: int, followHttpPrefix: str,
|
||||||
client_to_server: bool, federationList: [],
|
client_to_server: bool, federationList: [],
|
||||||
sendThreads: [], postLog: [], cachedWebfingers: {},
|
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||||
personCache: {}, debug: bool,
|
personCache: {}, debug: bool,
|
||||||
project_version: str, signingPrivateKeyPem: str) -> {}:
|
project_version: str, signingPrivateKeyPem: str) -> {}:
|
||||||
"""Gets the json object for sending a follow request
|
"""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',
|
'https://www.w3.org/ns/activitystreams#Public',
|
||||||
http_prefix, True, client_to_server,
|
http_prefix, True, client_to_server,
|
||||||
federationList,
|
federationList,
|
||||||
sendThreads, postLog, cachedWebfingers, personCache,
|
send_threads, postLog, cachedWebfingers, personCache,
|
||||||
debug, project_version, None, groupAccount,
|
debug, project_version, None, groupAccount,
|
||||||
signingPrivateKeyPem, 8234389)
|
signingPrivateKeyPem, 8234389)
|
||||||
|
|
||||||
|
|
82
inbox.py
82
inbox.py
|
@ -792,7 +792,7 @@ def _receiveUndoFollow(session, base_dir: str, http_prefix: str,
|
||||||
|
|
||||||
|
|
||||||
def _receiveUndo(session, base_dir: str, http_prefix: str,
|
def _receiveUndo(session, base_dir: str, http_prefix: str,
|
||||||
port: int, sendThreads: [], postLog: [],
|
port: int, send_threads: [], postLog: [],
|
||||||
cachedWebfingers: {}, personCache: {},
|
cachedWebfingers: {}, personCache: {},
|
||||||
messageJson: {}, federationList: [],
|
messageJson: {}, federationList: [],
|
||||||
debug: bool) -> bool:
|
debug: bool) -> bool:
|
||||||
|
@ -939,7 +939,7 @@ def _receiveUpdateToQuestion(recentPostsCache: {}, messageJson: {},
|
||||||
|
|
||||||
def _receiveUpdate(recentPostsCache: {}, session, base_dir: str,
|
def _receiveUpdate(recentPostsCache: {}, session, base_dir: str,
|
||||||
http_prefix: str, domain: str, port: int,
|
http_prefix: str, domain: str, port: int,
|
||||||
sendThreads: [], postLog: [], cachedWebfingers: {},
|
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||||
personCache: {}, messageJson: {}, federationList: [],
|
personCache: {}, messageJson: {}, federationList: [],
|
||||||
nickname: str, debug: bool) -> bool:
|
nickname: str, debug: bool) -> bool:
|
||||||
"""Receives an Update activity within the POST section of HTTPServer
|
"""Receives an Update activity within the POST section of HTTPServer
|
||||||
|
@ -993,7 +993,7 @@ def _receiveLike(recentPostsCache: {},
|
||||||
session, handle: str, isGroup: bool, base_dir: str,
|
session, handle: str, isGroup: bool, base_dir: str,
|
||||||
http_prefix: str, domain: str, port: int,
|
http_prefix: str, domain: str, port: int,
|
||||||
onion_domain: str,
|
onion_domain: str,
|
||||||
sendThreads: [], postLog: [], cachedWebfingers: {},
|
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||||
personCache: {}, messageJson: {}, federationList: [],
|
personCache: {}, messageJson: {}, federationList: [],
|
||||||
debug: bool,
|
debug: bool,
|
||||||
signingPrivateKeyPem: str,
|
signingPrivateKeyPem: str,
|
||||||
|
@ -1115,7 +1115,7 @@ def _receiveLike(recentPostsCache: {},
|
||||||
def _receiveUndoLike(recentPostsCache: {},
|
def _receiveUndoLike(recentPostsCache: {},
|
||||||
session, handle: str, isGroup: bool, base_dir: str,
|
session, handle: str, isGroup: bool, base_dir: str,
|
||||||
http_prefix: str, domain: str, port: int,
|
http_prefix: str, domain: str, port: int,
|
||||||
sendThreads: [], postLog: [], cachedWebfingers: {},
|
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||||
personCache: {}, messageJson: {}, federationList: [],
|
personCache: {}, messageJson: {}, federationList: [],
|
||||||
debug: bool,
|
debug: bool,
|
||||||
signingPrivateKeyPem: str,
|
signingPrivateKeyPem: str,
|
||||||
|
@ -1227,7 +1227,7 @@ def _receiveReaction(recentPostsCache: {},
|
||||||
session, handle: str, isGroup: bool, base_dir: str,
|
session, handle: str, isGroup: bool, base_dir: str,
|
||||||
http_prefix: str, domain: str, port: int,
|
http_prefix: str, domain: str, port: int,
|
||||||
onion_domain: str,
|
onion_domain: str,
|
||||||
sendThreads: [], postLog: [], cachedWebfingers: {},
|
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||||
personCache: {}, messageJson: {}, federationList: [],
|
personCache: {}, messageJson: {}, federationList: [],
|
||||||
debug: bool,
|
debug: bool,
|
||||||
signingPrivateKeyPem: str,
|
signingPrivateKeyPem: str,
|
||||||
|
@ -1374,7 +1374,7 @@ def _receiveReaction(recentPostsCache: {},
|
||||||
def _receiveUndoReaction(recentPostsCache: {},
|
def _receiveUndoReaction(recentPostsCache: {},
|
||||||
session, handle: str, isGroup: bool, base_dir: str,
|
session, handle: str, isGroup: bool, base_dir: str,
|
||||||
http_prefix: str, domain: str, port: int,
|
http_prefix: str, domain: str, port: int,
|
||||||
sendThreads: [], postLog: [], cachedWebfingers: {},
|
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||||
personCache: {}, messageJson: {}, federationList: [],
|
personCache: {}, messageJson: {}, federationList: [],
|
||||||
debug: bool,
|
debug: bool,
|
||||||
signingPrivateKeyPem: str,
|
signingPrivateKeyPem: str,
|
||||||
|
@ -1501,7 +1501,7 @@ def _receiveUndoReaction(recentPostsCache: {},
|
||||||
def _receiveBookmark(recentPostsCache: {},
|
def _receiveBookmark(recentPostsCache: {},
|
||||||
session, handle: str, isGroup: bool, base_dir: str,
|
session, handle: str, isGroup: bool, base_dir: str,
|
||||||
http_prefix: str, domain: str, port: int,
|
http_prefix: str, domain: str, port: int,
|
||||||
sendThreads: [], postLog: [], cachedWebfingers: {},
|
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||||
personCache: {}, messageJson: {}, federationList: [],
|
personCache: {}, messageJson: {}, federationList: [],
|
||||||
debug: bool, signingPrivateKeyPem: str,
|
debug: bool, signingPrivateKeyPem: str,
|
||||||
max_recent_posts: int, translate: {},
|
max_recent_posts: int, translate: {},
|
||||||
|
@ -1611,7 +1611,7 @@ def _receiveBookmark(recentPostsCache: {},
|
||||||
def _receiveUndoBookmark(recentPostsCache: {},
|
def _receiveUndoBookmark(recentPostsCache: {},
|
||||||
session, handle: str, isGroup: bool, base_dir: str,
|
session, handle: str, isGroup: bool, base_dir: str,
|
||||||
http_prefix: str, domain: str, port: int,
|
http_prefix: str, domain: str, port: int,
|
||||||
sendThreads: [], postLog: [], cachedWebfingers: {},
|
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||||
personCache: {}, messageJson: {}, federationList: [],
|
personCache: {}, messageJson: {}, federationList: [],
|
||||||
debug: bool, signingPrivateKeyPem: str,
|
debug: bool, signingPrivateKeyPem: str,
|
||||||
max_recent_posts: int, translate: {},
|
max_recent_posts: int, translate: {},
|
||||||
|
@ -1720,7 +1720,7 @@ def _receiveUndoBookmark(recentPostsCache: {},
|
||||||
|
|
||||||
def _receiveDelete(session, handle: str, isGroup: bool, base_dir: str,
|
def _receiveDelete(session, handle: str, isGroup: bool, base_dir: str,
|
||||||
http_prefix: str, domain: str, port: int,
|
http_prefix: str, domain: str, port: int,
|
||||||
sendThreads: [], postLog: [], cachedWebfingers: {},
|
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||||
personCache: {}, messageJson: {}, federationList: [],
|
personCache: {}, messageJson: {}, federationList: [],
|
||||||
debug: bool, allow_deletion: bool,
|
debug: bool, allow_deletion: bool,
|
||||||
recentPostsCache: {}) -> bool:
|
recentPostsCache: {}) -> bool:
|
||||||
|
@ -1797,7 +1797,7 @@ def _receiveAnnounce(recentPostsCache: {},
|
||||||
session, handle: str, isGroup: bool, base_dir: str,
|
session, handle: str, isGroup: bool, base_dir: str,
|
||||||
http_prefix: str,
|
http_prefix: str,
|
||||||
domain: str, onion_domain: str, port: int,
|
domain: str, onion_domain: str, port: int,
|
||||||
sendThreads: [], postLog: [], cachedWebfingers: {},
|
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||||
personCache: {}, messageJson: {}, federationList: [],
|
personCache: {}, messageJson: {}, federationList: [],
|
||||||
debug: bool, translate: {},
|
debug: bool, translate: {},
|
||||||
yt_replace_domain: str,
|
yt_replace_domain: str,
|
||||||
|
@ -2024,7 +2024,7 @@ def _receiveAnnounce(recentPostsCache: {},
|
||||||
def _receiveUndoAnnounce(recentPostsCache: {},
|
def _receiveUndoAnnounce(recentPostsCache: {},
|
||||||
session, handle: str, isGroup: bool, base_dir: str,
|
session, handle: str, isGroup: bool, base_dir: str,
|
||||||
http_prefix: str, domain: str, port: int,
|
http_prefix: str, domain: str, port: int,
|
||||||
sendThreads: [], postLog: [], cachedWebfingers: {},
|
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||||
personCache: {}, messageJson: {}, federationList: [],
|
personCache: {}, messageJson: {}, federationList: [],
|
||||||
debug: bool) -> bool:
|
debug: bool) -> bool:
|
||||||
"""Receives an undo announce activity within the POST section of HTTPServer
|
"""Receives an undo announce activity within the POST section of HTTPServer
|
||||||
|
@ -2608,7 +2608,7 @@ def _groupHandle(base_dir: str, handle: str) -> bool:
|
||||||
def _sendToGroupMembers(session, base_dir: str, handle: str, port: int,
|
def _sendToGroupMembers(session, base_dir: str, handle: str, port: int,
|
||||||
postJsonObject: {},
|
postJsonObject: {},
|
||||||
http_prefix: str, federationList: [],
|
http_prefix: str, federationList: [],
|
||||||
sendThreads: [], postLog: [], cachedWebfingers: {},
|
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||||
personCache: {}, debug: bool,
|
personCache: {}, debug: bool,
|
||||||
systemLanguage: str,
|
systemLanguage: str,
|
||||||
onion_domain: str, i2p_domain: str,
|
onion_domain: str, i2p_domain: str,
|
||||||
|
@ -2661,14 +2661,14 @@ def _sendToGroupMembers(session, base_dir: str, handle: str, port: int,
|
||||||
nickname, domain, port,
|
nickname, domain, port,
|
||||||
groupActor + '/followers', cc,
|
groupActor + '/followers', cc,
|
||||||
http_prefix, postId, False, False,
|
http_prefix, postId, False, False,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
personCache, cachedWebfingers,
|
personCache, cachedWebfingers,
|
||||||
debug, __version__, signingPrivateKeyPem)
|
debug, __version__, signingPrivateKeyPem)
|
||||||
|
|
||||||
sendToFollowersThread(session, base_dir, nickname, domain,
|
sendToFollowersThread(session, base_dir, nickname, domain,
|
||||||
onion_domain, i2p_domain, port,
|
onion_domain, i2p_domain, port,
|
||||||
http_prefix, federationList,
|
http_prefix, federationList,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
cachedWebfingers, personCache,
|
cachedWebfingers, personCache,
|
||||||
announceJson, debug, __version__,
|
announceJson, debug, __version__,
|
||||||
shared_items_federated_domains,
|
shared_items_federated_domains,
|
||||||
|
@ -2790,7 +2790,7 @@ def _updateLastSeen(base_dir: str, handle: str, actor: str) -> None:
|
||||||
def _bounceDM(senderPostId: str, session, http_prefix: str,
|
def _bounceDM(senderPostId: str, session, http_prefix: str,
|
||||||
base_dir: str, nickname: str, domain: str, port: int,
|
base_dir: str, nickname: str, domain: str, port: int,
|
||||||
sendingHandle: str, federationList: [],
|
sendingHandle: str, federationList: [],
|
||||||
sendThreads: [], postLog: [],
|
send_threads: [], postLog: [],
|
||||||
cachedWebfingers: {}, personCache: {},
|
cachedWebfingers: {}, personCache: {},
|
||||||
translate: {}, debug: bool,
|
translate: {}, debug: bool,
|
||||||
lastBounceMessage: [], systemLanguage: str,
|
lastBounceMessage: [], systemLanguage: str,
|
||||||
|
@ -2865,7 +2865,7 @@ def _bounceDM(senderPostId: str, session, http_prefix: str,
|
||||||
nickname, domain, port,
|
nickname, domain, port,
|
||||||
senderNickname, senderDomain, senderPort, cc,
|
senderNickname, senderDomain, senderPort, cc,
|
||||||
http_prefix, False, False, federationList,
|
http_prefix, False, False, federationList,
|
||||||
sendThreads, postLog, cachedWebfingers,
|
send_threads, postLog, cachedWebfingers,
|
||||||
personCache, debug, __version__, None, groupAccount,
|
personCache, debug, __version__, None, groupAccount,
|
||||||
signingPrivateKeyPem, 7238634)
|
signingPrivateKeyPem, 7238634)
|
||||||
return True
|
return True
|
||||||
|
@ -2875,7 +2875,7 @@ def _isValidDM(base_dir: str, nickname: str, domain: str, port: int,
|
||||||
postJsonObject: {}, updateIndexList: [],
|
postJsonObject: {}, updateIndexList: [],
|
||||||
session, http_prefix: str,
|
session, http_prefix: str,
|
||||||
federationList: [],
|
federationList: [],
|
||||||
sendThreads: [], postLog: [],
|
send_threads: [], postLog: [],
|
||||||
cachedWebfingers: {},
|
cachedWebfingers: {},
|
||||||
personCache: {},
|
personCache: {},
|
||||||
translate: {}, debug: bool,
|
translate: {}, debug: bool,
|
||||||
|
@ -2954,7 +2954,7 @@ def _isValidDM(base_dir: str, nickname: str, domain: str, port: int,
|
||||||
nickname, domain,
|
nickname, domain,
|
||||||
port, sendH,
|
port, sendH,
|
||||||
federationList,
|
federationList,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
cachedWebfingers,
|
cachedWebfingers,
|
||||||
personCache,
|
personCache,
|
||||||
translate, debug,
|
translate, debug,
|
||||||
|
@ -2976,7 +2976,7 @@ def _receiveQuestionVote(base_dir: str, nickname: str, domain: str,
|
||||||
postJsonObject: {}, recentPostsCache: {},
|
postJsonObject: {}, recentPostsCache: {},
|
||||||
session, onion_domain: str,
|
session, onion_domain: str,
|
||||||
i2p_domain: str, port: int,
|
i2p_domain: str, port: int,
|
||||||
federationList: [], sendThreads: [], postLog: [],
|
federationList: [], send_threads: [], postLog: [],
|
||||||
cachedWebfingers: {}, personCache: {},
|
cachedWebfingers: {}, personCache: {},
|
||||||
signingPrivateKeyPem: str,
|
signingPrivateKeyPem: str,
|
||||||
max_recent_posts: int, translate: {},
|
max_recent_posts: int, translate: {},
|
||||||
|
@ -3053,7 +3053,7 @@ def _receiveQuestionVote(base_dir: str, nickname: str, domain: str,
|
||||||
sendToFollowersThread(session, base_dir, nickname, domain,
|
sendToFollowersThread(session, base_dir, nickname, domain,
|
||||||
onion_domain, i2p_domain, port,
|
onion_domain, i2p_domain, port,
|
||||||
http_prefix, federationList,
|
http_prefix, federationList,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
cachedWebfingers, personCache,
|
cachedWebfingers, personCache,
|
||||||
postJsonObject, debug, __version__,
|
postJsonObject, debug, __version__,
|
||||||
shared_items_federated_domains,
|
shared_items_federated_domains,
|
||||||
|
@ -3178,7 +3178,7 @@ def _checkForGitPatches(base_dir: str, nickname: str, domain: str,
|
||||||
|
|
||||||
def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
||||||
session, keyId: str, handle: str, messageJson: {},
|
session, keyId: str, handle: str, messageJson: {},
|
||||||
base_dir: str, http_prefix: str, sendThreads: [],
|
base_dir: str, http_prefix: str, send_threads: [],
|
||||||
postLog: [], cachedWebfingers: {}, personCache: {},
|
postLog: [], cachedWebfingers: {}, personCache: {},
|
||||||
queue: [], domain: str,
|
queue: [], domain: str,
|
||||||
onion_domain: str, i2p_domain: str,
|
onion_domain: str, i2p_domain: str,
|
||||||
|
@ -3216,7 +3216,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
||||||
base_dir, http_prefix,
|
base_dir, http_prefix,
|
||||||
domain, port,
|
domain, port,
|
||||||
onion_domain,
|
onion_domain,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
cachedWebfingers,
|
cachedWebfingers,
|
||||||
personCache,
|
personCache,
|
||||||
messageJson,
|
messageJson,
|
||||||
|
@ -3238,7 +3238,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
||||||
session, handle, isGroup,
|
session, handle, isGroup,
|
||||||
base_dir, http_prefix,
|
base_dir, http_prefix,
|
||||||
domain, port,
|
domain, port,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
cachedWebfingers,
|
cachedWebfingers,
|
||||||
personCache,
|
personCache,
|
||||||
messageJson,
|
messageJson,
|
||||||
|
@ -3261,7 +3261,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
||||||
base_dir, http_prefix,
|
base_dir, http_prefix,
|
||||||
domain, port,
|
domain, port,
|
||||||
onion_domain,
|
onion_domain,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
cachedWebfingers,
|
cachedWebfingers,
|
||||||
personCache,
|
personCache,
|
||||||
messageJson,
|
messageJson,
|
||||||
|
@ -3283,7 +3283,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
||||||
session, handle, isGroup,
|
session, handle, isGroup,
|
||||||
base_dir, http_prefix,
|
base_dir, http_prefix,
|
||||||
domain, port,
|
domain, port,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
cachedWebfingers,
|
cachedWebfingers,
|
||||||
personCache,
|
personCache,
|
||||||
messageJson,
|
messageJson,
|
||||||
|
@ -3305,7 +3305,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
||||||
session, handle, isGroup,
|
session, handle, isGroup,
|
||||||
base_dir, http_prefix,
|
base_dir, http_prefix,
|
||||||
domain, port,
|
domain, port,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
cachedWebfingers,
|
cachedWebfingers,
|
||||||
personCache,
|
personCache,
|
||||||
messageJson,
|
messageJson,
|
||||||
|
@ -3327,7 +3327,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
||||||
session, handle, isGroup,
|
session, handle, isGroup,
|
||||||
base_dir, http_prefix,
|
base_dir, http_prefix,
|
||||||
domain, port,
|
domain, port,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
cachedWebfingers,
|
cachedWebfingers,
|
||||||
personCache,
|
personCache,
|
||||||
messageJson,
|
messageJson,
|
||||||
|
@ -3352,7 +3352,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
||||||
session, handle, isGroup,
|
session, handle, isGroup,
|
||||||
base_dir, http_prefix,
|
base_dir, http_prefix,
|
||||||
domain, onion_domain, port,
|
domain, onion_domain, port,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
cachedWebfingers,
|
cachedWebfingers,
|
||||||
personCache,
|
personCache,
|
||||||
messageJson,
|
messageJson,
|
||||||
|
@ -3374,7 +3374,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
||||||
session, handle, isGroup,
|
session, handle, isGroup,
|
||||||
base_dir, http_prefix,
|
base_dir, http_prefix,
|
||||||
domain, port,
|
domain, port,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
cachedWebfingers,
|
cachedWebfingers,
|
||||||
personCache,
|
personCache,
|
||||||
messageJson,
|
messageJson,
|
||||||
|
@ -3387,7 +3387,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
||||||
if _receiveDelete(session, handle, isGroup,
|
if _receiveDelete(session, handle, isGroup,
|
||||||
base_dir, http_prefix,
|
base_dir, http_prefix,
|
||||||
domain, port,
|
domain, port,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
cachedWebfingers,
|
cachedWebfingers,
|
||||||
personCache,
|
personCache,
|
||||||
messageJson,
|
messageJson,
|
||||||
|
@ -3452,7 +3452,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
||||||
http_prefix, handle, debug,
|
http_prefix, handle, debug,
|
||||||
postJsonObject, recentPostsCache,
|
postJsonObject, recentPostsCache,
|
||||||
session, onion_domain, i2p_domain, port,
|
session, onion_domain, i2p_domain, port,
|
||||||
federationList, sendThreads, postLog,
|
federationList, send_threads, postLog,
|
||||||
cachedWebfingers, personCache,
|
cachedWebfingers, personCache,
|
||||||
signingPrivateKeyPem,
|
signingPrivateKeyPem,
|
||||||
max_recent_posts, translate,
|
max_recent_posts, translate,
|
||||||
|
@ -3475,7 +3475,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
||||||
postJsonObject, updateIndexList,
|
postJsonObject, updateIndexList,
|
||||||
session, http_prefix,
|
session, http_prefix,
|
||||||
federationList,
|
federationList,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
cachedWebfingers,
|
cachedWebfingers,
|
||||||
personCache,
|
personCache,
|
||||||
translate, debug,
|
translate, debug,
|
||||||
|
@ -3608,7 +3608,7 @@ def _inboxAfterInitial(recentPostsCache: {}, max_recent_posts: int,
|
||||||
if isGroup:
|
if isGroup:
|
||||||
_sendToGroupMembers(session, base_dir, handle, port,
|
_sendToGroupMembers(session, base_dir, handle, port,
|
||||||
postJsonObject,
|
postJsonObject,
|
||||||
http_prefix, federationList, sendThreads,
|
http_prefix, federationList, send_threads,
|
||||||
postLog, cachedWebfingers, personCache,
|
postLog, cachedWebfingers, personCache,
|
||||||
debug, systemLanguage,
|
debug, systemLanguage,
|
||||||
onion_domain, i2p_domain,
|
onion_domain, i2p_domain,
|
||||||
|
@ -3845,7 +3845,7 @@ def _checkJsonSignature(base_dir: str, queueJson: {}) -> (bool, bool):
|
||||||
|
|
||||||
|
|
||||||
def _receiveFollowRequest(session, base_dir: str, http_prefix: str,
|
def _receiveFollowRequest(session, base_dir: str, http_prefix: str,
|
||||||
port: int, sendThreads: [], postLog: [],
|
port: int, send_threads: [], postLog: [],
|
||||||
cachedWebfingers: {}, personCache: {},
|
cachedWebfingers: {}, personCache: {},
|
||||||
messageJson: {}, federationList: [],
|
messageJson: {}, federationList: [],
|
||||||
debug: bool, project_version: str,
|
debug: bool, project_version: str,
|
||||||
|
@ -4053,7 +4053,7 @@ def _receiveFollowRequest(session, base_dir: str, http_prefix: str,
|
||||||
nicknameToFollow, domainToFollow, port,
|
nicknameToFollow, domainToFollow, port,
|
||||||
nickname, domain, fromPort,
|
nickname, domain, fromPort,
|
||||||
messageJson['actor'], federationList,
|
messageJson['actor'], federationList,
|
||||||
messageJson, sendThreads, postLog,
|
messageJson, send_threads, postLog,
|
||||||
cachedWebfingers, personCache,
|
cachedWebfingers, personCache,
|
||||||
debug, project_version, True,
|
debug, project_version, True,
|
||||||
signingPrivateKeyPem)
|
signingPrivateKeyPem)
|
||||||
|
@ -4062,7 +4062,7 @@ def _receiveFollowRequest(session, base_dir: str, http_prefix: str,
|
||||||
def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
|
def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
|
||||||
project_version: str,
|
project_version: str,
|
||||||
base_dir: str, http_prefix: str,
|
base_dir: str, http_prefix: str,
|
||||||
sendThreads: [], postLog: [],
|
send_threads: [], postLog: [],
|
||||||
cachedWebfingers: {}, personCache: {}, queue: [],
|
cachedWebfingers: {}, personCache: {}, queue: [],
|
||||||
domain: str,
|
domain: str,
|
||||||
onion_domain: str, i2p_domain: str,
|
onion_domain: str, i2p_domain: str,
|
||||||
|
@ -4345,7 +4345,7 @@ def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
|
||||||
|
|
||||||
if _receiveUndo(session,
|
if _receiveUndo(session,
|
||||||
base_dir, http_prefix, port,
|
base_dir, http_prefix, port,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
cachedWebfingers,
|
cachedWebfingers,
|
||||||
personCache,
|
personCache,
|
||||||
queueJson['post'],
|
queueJson['post'],
|
||||||
|
@ -4366,7 +4366,7 @@ def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
|
||||||
print('DEBUG: checking for follow requests')
|
print('DEBUG: checking for follow requests')
|
||||||
if _receiveFollowRequest(session,
|
if _receiveFollowRequest(session,
|
||||||
base_dir, http_prefix, port,
|
base_dir, http_prefix, port,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
cachedWebfingers,
|
cachedWebfingers,
|
||||||
personCache,
|
personCache,
|
||||||
queueJson['post'],
|
queueJson['post'],
|
||||||
|
@ -4391,7 +4391,7 @@ def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
|
||||||
|
|
||||||
if receiveAcceptReject(session,
|
if receiveAcceptReject(session,
|
||||||
base_dir, http_prefix, domain, port,
|
base_dir, http_prefix, domain, port,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
cachedWebfingers, personCache,
|
cachedWebfingers, personCache,
|
||||||
queueJson['post'],
|
queueJson['post'],
|
||||||
federationList, debug):
|
federationList, debug):
|
||||||
|
@ -4409,7 +4409,7 @@ def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
|
||||||
if _receiveUpdate(recentPostsCache, session,
|
if _receiveUpdate(recentPostsCache, session,
|
||||||
base_dir, http_prefix,
|
base_dir, http_prefix,
|
||||||
domain, port,
|
domain, port,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
cachedWebfingers,
|
cachedWebfingers,
|
||||||
personCache,
|
personCache,
|
||||||
queueJson['post'],
|
queueJson['post'],
|
||||||
|
@ -4491,7 +4491,7 @@ def runInboxQueue(recentPostsCache: {}, max_recent_posts: int,
|
||||||
session, keyId, handle,
|
session, keyId, handle,
|
||||||
queueJson['post'],
|
queueJson['post'],
|
||||||
base_dir, http_prefix,
|
base_dir, http_prefix,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
cachedWebfingers,
|
cachedWebfingers,
|
||||||
personCache, queue,
|
personCache, queue,
|
||||||
domain,
|
domain,
|
||||||
|
|
8
like.py
8
like.py
|
@ -74,7 +74,7 @@ def _like(recentPostsCache: {},
|
||||||
ccList: [], http_prefix: str,
|
ccList: [], http_prefix: str,
|
||||||
objectUrl: str, actorLiked: str,
|
objectUrl: str, actorLiked: str,
|
||||||
client_to_server: bool,
|
client_to_server: bool,
|
||||||
sendThreads: [], postLog: [],
|
send_threads: [], postLog: [],
|
||||||
personCache: {}, cachedWebfingers: {},
|
personCache: {}, cachedWebfingers: {},
|
||||||
debug: bool, project_version: str,
|
debug: bool, project_version: str,
|
||||||
signingPrivateKeyPem: str) -> {}:
|
signingPrivateKeyPem: str) -> {}:
|
||||||
|
@ -136,7 +136,7 @@ def _like(recentPostsCache: {},
|
||||||
likedPostNickname, likedPostDomain, likedPostPort,
|
likedPostNickname, likedPostDomain, likedPostPort,
|
||||||
'https://www.w3.org/ns/activitystreams#Public',
|
'https://www.w3.org/ns/activitystreams#Public',
|
||||||
http_prefix, True, client_to_server, federationList,
|
http_prefix, True, client_to_server, federationList,
|
||||||
sendThreads, postLog, cachedWebfingers, personCache,
|
send_threads, postLog, cachedWebfingers, personCache,
|
||||||
debug, project_version, None, groupAccount,
|
debug, project_version, None, groupAccount,
|
||||||
signingPrivateKeyPem, 7367374)
|
signingPrivateKeyPem, 7367374)
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ def likePost(recentPostsCache: {},
|
||||||
likeNickname: str, likeDomain: str, likePort: int,
|
likeNickname: str, likeDomain: str, likePort: int,
|
||||||
ccList: [],
|
ccList: [],
|
||||||
likeStatusNumber: int, client_to_server: bool,
|
likeStatusNumber: int, client_to_server: bool,
|
||||||
sendThreads: [], postLog: [],
|
send_threads: [], postLog: [],
|
||||||
personCache: {}, cachedWebfingers: {},
|
personCache: {}, cachedWebfingers: {},
|
||||||
debug: bool, project_version: str,
|
debug: bool, project_version: str,
|
||||||
signingPrivateKeyPem: str) -> {}:
|
signingPrivateKeyPem: str) -> {}:
|
||||||
|
@ -163,7 +163,7 @@ def likePost(recentPostsCache: {},
|
||||||
return _like(recentPostsCache,
|
return _like(recentPostsCache,
|
||||||
session, base_dir, federationList, nickname, domain, port,
|
session, base_dir, federationList, nickname, domain, port,
|
||||||
ccList, http_prefix, objectUrl, actorLiked, client_to_server,
|
ccList, http_prefix, objectUrl, actorLiked, client_to_server,
|
||||||
sendThreads, postLog, personCache, cachedWebfingers,
|
send_threads, postLog, personCache, cachedWebfingers,
|
||||||
debug, project_version, signingPrivateKeyPem)
|
debug, project_version, signingPrivateKeyPem)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ def manualDenyFollowRequest(session, base_dir: str,
|
||||||
nickname: str, domain: str, port: int,
|
nickname: str, domain: str, port: int,
|
||||||
denyHandle: str,
|
denyHandle: str,
|
||||||
federationList: [],
|
federationList: [],
|
||||||
sendThreads: [], postLog: [],
|
send_threads: [], postLog: [],
|
||||||
cachedWebfingers: {}, personCache: {},
|
cachedWebfingers: {}, personCache: {},
|
||||||
debug: bool,
|
debug: bool,
|
||||||
project_version: str,
|
project_version: str,
|
||||||
|
@ -63,7 +63,7 @@ def manualDenyFollowRequest(session, base_dir: str,
|
||||||
nickname, domain, port,
|
nickname, domain, port,
|
||||||
denyNickname, denyDomain, denyPort,
|
denyNickname, denyDomain, denyPort,
|
||||||
federationList,
|
federationList,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
cachedWebfingers, personCache,
|
cachedWebfingers, personCache,
|
||||||
debug, project_version,
|
debug, project_version,
|
||||||
signingPrivateKeyPem)
|
signingPrivateKeyPem)
|
||||||
|
@ -76,7 +76,7 @@ def manualDenyFollowRequestThread(session, base_dir: str,
|
||||||
nickname: str, domain: str, port: int,
|
nickname: str, domain: str, port: int,
|
||||||
denyHandle: str,
|
denyHandle: str,
|
||||||
federationList: [],
|
federationList: [],
|
||||||
sendThreads: [], postLog: [],
|
send_threads: [], postLog: [],
|
||||||
cachedWebfingers: {}, personCache: {},
|
cachedWebfingers: {}, personCache: {},
|
||||||
debug: bool,
|
debug: bool,
|
||||||
project_version: str,
|
project_version: str,
|
||||||
|
@ -91,13 +91,13 @@ def manualDenyFollowRequestThread(session, base_dir: str,
|
||||||
nickname, domain, port,
|
nickname, domain, port,
|
||||||
denyHandle,
|
denyHandle,
|
||||||
federationList,
|
federationList,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
cachedWebfingers, personCache,
|
cachedWebfingers, personCache,
|
||||||
debug,
|
debug,
|
||||||
project_version,
|
project_version,
|
||||||
signingPrivateKeyPem), daemon=True)
|
signingPrivateKeyPem), daemon=True)
|
||||||
thr.start()
|
thr.start()
|
||||||
sendThreads.append(thr)
|
send_threads.append(thr)
|
||||||
|
|
||||||
|
|
||||||
def _approveFollowerHandle(accountDir: str, approveHandle: str) -> None:
|
def _approveFollowerHandle(accountDir: str, approveHandle: str) -> None:
|
||||||
|
@ -125,7 +125,7 @@ def manualApproveFollowRequest(session, base_dir: str,
|
||||||
nickname: str, domain: str, port: int,
|
nickname: str, domain: str, port: int,
|
||||||
approveHandle: str,
|
approveHandle: str,
|
||||||
federationList: [],
|
federationList: [],
|
||||||
sendThreads: [], postLog: [],
|
send_threads: [], postLog: [],
|
||||||
cachedWebfingers: {}, personCache: {},
|
cachedWebfingers: {}, personCache: {},
|
||||||
debug: bool,
|
debug: bool,
|
||||||
project_version: str,
|
project_version: str,
|
||||||
|
@ -214,7 +214,7 @@ def manualApproveFollowRequest(session, base_dir: str,
|
||||||
followJson['actor'],
|
followJson['actor'],
|
||||||
federationList,
|
federationList,
|
||||||
followJson,
|
followJson,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
cachedWebfingers,
|
cachedWebfingers,
|
||||||
personCache,
|
personCache,
|
||||||
debug,
|
debug,
|
||||||
|
@ -282,7 +282,7 @@ def manualApproveFollowRequestThread(session, base_dir: str,
|
||||||
nickname: str, domain: str, port: int,
|
nickname: str, domain: str, port: int,
|
||||||
approveHandle: str,
|
approveHandle: str,
|
||||||
federationList: [],
|
federationList: [],
|
||||||
sendThreads: [], postLog: [],
|
send_threads: [], postLog: [],
|
||||||
cachedWebfingers: {}, personCache: {},
|
cachedWebfingers: {}, personCache: {},
|
||||||
debug: bool,
|
debug: bool,
|
||||||
project_version: str,
|
project_version: str,
|
||||||
|
@ -297,10 +297,10 @@ def manualApproveFollowRequestThread(session, base_dir: str,
|
||||||
nickname, domain, port,
|
nickname, domain, port,
|
||||||
approveHandle,
|
approveHandle,
|
||||||
federationList,
|
federationList,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
cachedWebfingers, personCache,
|
cachedWebfingers, personCache,
|
||||||
debug,
|
debug,
|
||||||
project_version,
|
project_version,
|
||||||
signingPrivateKeyPem), daemon=True)
|
signingPrivateKeyPem), daemon=True)
|
||||||
thr.start()
|
thr.start()
|
||||||
sendThreads.append(thr)
|
send_threads.append(thr)
|
||||||
|
|
|
@ -379,7 +379,7 @@ def _newswireHashtagProcessing(session, base_dir: str, postJsonObject: {},
|
||||||
personCache: {},
|
personCache: {},
|
||||||
cachedWebfingers: {},
|
cachedWebfingers: {},
|
||||||
federationList: [],
|
federationList: [],
|
||||||
sendThreads: [], postLog: [],
|
send_threads: [], postLog: [],
|
||||||
moderated: bool, url: str,
|
moderated: bool, url: str,
|
||||||
systemLanguage: str,
|
systemLanguage: str,
|
||||||
translate: {}) -> bool:
|
translate: {}) -> bool:
|
||||||
|
@ -541,7 +541,7 @@ def _convertRSStoActivityPub(base_dir: str, http_prefix: str,
|
||||||
session, cachedWebfingers: {},
|
session, cachedWebfingers: {},
|
||||||
personCache: {},
|
personCache: {},
|
||||||
federationList: [],
|
federationList: [],
|
||||||
sendThreads: [], postLog: [],
|
send_threads: [], postLog: [],
|
||||||
max_mirrored_articles: int,
|
max_mirrored_articles: int,
|
||||||
allow_local_network_access: bool,
|
allow_local_network_access: bool,
|
||||||
systemLanguage: str,
|
systemLanguage: str,
|
||||||
|
@ -684,7 +684,7 @@ def _convertRSStoActivityPub(base_dir: str, http_prefix: str,
|
||||||
http_prefix, domain, port,
|
http_prefix, domain, port,
|
||||||
personCache, cachedWebfingers,
|
personCache, cachedWebfingers,
|
||||||
federationList,
|
federationList,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
moderated, url, systemLanguage,
|
moderated, url, systemLanguage,
|
||||||
translate)
|
translate)
|
||||||
|
|
||||||
|
@ -831,7 +831,7 @@ def runNewswireDaemon(base_dir: str, httpd,
|
||||||
httpd.cachedWebfingers,
|
httpd.cachedWebfingers,
|
||||||
httpd.personCache,
|
httpd.personCache,
|
||||||
httpd.federationList,
|
httpd.federationList,
|
||||||
httpd.sendThreads,
|
httpd.send_threads,
|
||||||
httpd.postLog,
|
httpd.postLog,
|
||||||
httpd.max_mirrored_articles,
|
httpd.max_mirrored_articles,
|
||||||
httpd.allow_local_network_access,
|
httpd.allow_local_network_access,
|
||||||
|
|
|
@ -183,7 +183,7 @@ def postMessageToOutbox(session, translate: {},
|
||||||
domain: str, domainFull: str,
|
domain: str, domainFull: str,
|
||||||
onion_domain: str, i2p_domain: str, port: int,
|
onion_domain: str, i2p_domain: str, port: int,
|
||||||
recentPostsCache: {}, followersThreads: [],
|
recentPostsCache: {}, followersThreads: [],
|
||||||
federationList: [], sendThreads: [],
|
federationList: [], send_threads: [],
|
||||||
postLog: [], cachedWebfingers: {},
|
postLog: [], cachedWebfingers: {},
|
||||||
personCache: {}, allow_deletion: bool,
|
personCache: {}, allow_deletion: bool,
|
||||||
proxy_type: str, version: str, debug: bool,
|
proxy_type: str, version: str, debug: bool,
|
||||||
|
@ -515,7 +515,7 @@ def postMessageToOutbox(session, translate: {},
|
||||||
domain, onion_domain, i2p_domain,
|
domain, onion_domain, i2p_domain,
|
||||||
port, http_prefix,
|
port, http_prefix,
|
||||||
federationList,
|
federationList,
|
||||||
sendThreads,
|
send_threads,
|
||||||
postLog,
|
postLog,
|
||||||
cachedWebfingers,
|
cachedWebfingers,
|
||||||
personCache,
|
personCache,
|
||||||
|
@ -656,7 +656,7 @@ def postMessageToOutbox(session, translate: {},
|
||||||
domain, onion_domain, i2p_domain, port,
|
domain, onion_domain, i2p_domain, port,
|
||||||
http_prefix,
|
http_prefix,
|
||||||
federationList,
|
federationList,
|
||||||
sendThreads,
|
send_threads,
|
||||||
postLog,
|
postLog,
|
||||||
cachedWebfingers,
|
cachedWebfingers,
|
||||||
personCache,
|
personCache,
|
||||||
|
|
38
posts.py
38
posts.py
|
@ -2271,7 +2271,7 @@ def sendPost(signingPrivateKeyPem: str, project_version: str,
|
||||||
commentsEnabled: bool,
|
commentsEnabled: bool,
|
||||||
attachImageFilename: str, mediaType: str,
|
attachImageFilename: str, mediaType: str,
|
||||||
imageDescription: str, city: str,
|
imageDescription: str, city: str,
|
||||||
federationList: [], sendThreads: [], postLog: [],
|
federationList: [], send_threads: [], postLog: [],
|
||||||
cachedWebfingers: {}, personCache: {},
|
cachedWebfingers: {}, personCache: {},
|
||||||
isArticle: bool, systemLanguage: str,
|
isArticle: bool, systemLanguage: str,
|
||||||
shared_items_federated_domains: [],
|
shared_items_federated_domains: [],
|
||||||
|
@ -2395,10 +2395,10 @@ def sendPost(signingPrivateKeyPem: str, project_version: str,
|
||||||
print('signatureHeaderJson: ' + str(signatureHeaderJson))
|
print('signatureHeaderJson: ' + str(signatureHeaderJson))
|
||||||
|
|
||||||
# Keep the number of threads being used small
|
# Keep the number of threads being used small
|
||||||
while len(sendThreads) > 1000:
|
while len(send_threads) > 1000:
|
||||||
print('WARN: Maximum threads reached - killing send thread')
|
print('WARN: Maximum threads reached - killing send thread')
|
||||||
sendThreads[0].kill()
|
send_threads[0].kill()
|
||||||
sendThreads.pop(0)
|
send_threads.pop(0)
|
||||||
print('WARN: thread killed')
|
print('WARN: thread killed')
|
||||||
thr = \
|
thr = \
|
||||||
threadWithTrace(target=threadSendPost,
|
threadWithTrace(target=threadSendPost,
|
||||||
|
@ -2409,7 +2409,7 @@ def sendPost(signingPrivateKeyPem: str, project_version: str,
|
||||||
signatureHeaderJson.copy(),
|
signatureHeaderJson.copy(),
|
||||||
postLog,
|
postLog,
|
||||||
debug), daemon=True)
|
debug), daemon=True)
|
||||||
sendThreads.append(thr)
|
send_threads.append(thr)
|
||||||
thr.start()
|
thr.start()
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
@ -2612,7 +2612,7 @@ def sendSignedJson(postJsonObject: {}, session, base_dir: str,
|
||||||
toNickname: str, toDomain: str, toPort: int, cc: str,
|
toNickname: str, toDomain: str, toPort: int, cc: str,
|
||||||
http_prefix: str, saveToFile: bool, client_to_server: bool,
|
http_prefix: str, saveToFile: bool, client_to_server: bool,
|
||||||
federationList: [],
|
federationList: [],
|
||||||
sendThreads: [], postLog: [], cachedWebfingers: {},
|
send_threads: [], postLog: [], cachedWebfingers: {},
|
||||||
personCache: {}, debug: bool, project_version: str,
|
personCache: {}, debug: bool, project_version: str,
|
||||||
sharedItemsToken: str, groupAccount: bool,
|
sharedItemsToken: str, groupAccount: bool,
|
||||||
signingPrivateKeyPem: str,
|
signingPrivateKeyPem: str,
|
||||||
|
@ -2754,10 +2754,10 @@ def sendSignedJson(postJsonObject: {}, session, base_dir: str,
|
||||||
print('Not sending shared items federation token')
|
print('Not sending shared items federation token')
|
||||||
|
|
||||||
# Keep the number of threads being used small
|
# Keep the number of threads being used small
|
||||||
while len(sendThreads) > 1000:
|
while len(send_threads) > 1000:
|
||||||
print('WARN: Maximum threads reached - killing send thread')
|
print('WARN: Maximum threads reached - killing send thread')
|
||||||
sendThreads[0].kill()
|
send_threads[0].kill()
|
||||||
sendThreads.pop(0)
|
send_threads.pop(0)
|
||||||
print('WARN: thread killed')
|
print('WARN: thread killed')
|
||||||
|
|
||||||
if debug:
|
if debug:
|
||||||
|
@ -2772,7 +2772,7 @@ def sendSignedJson(postJsonObject: {}, session, base_dir: str,
|
||||||
signatureHeaderJson.copy(),
|
signatureHeaderJson.copy(),
|
||||||
postLog,
|
postLog,
|
||||||
debug), daemon=True)
|
debug), daemon=True)
|
||||||
sendThreads.append(thr)
|
send_threads.append(thr)
|
||||||
# thr.start()
|
# thr.start()
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
@ -2860,7 +2860,7 @@ def _sendToNamedAddresses(session, base_dir: str,
|
||||||
nickname: str, domain: str,
|
nickname: str, domain: str,
|
||||||
onion_domain: str, i2p_domain: str, port: int,
|
onion_domain: str, i2p_domain: str, port: int,
|
||||||
http_prefix: str, federationList: [],
|
http_prefix: str, federationList: [],
|
||||||
sendThreads: [], postLog: [],
|
send_threads: [], postLog: [],
|
||||||
cachedWebfingers: {}, personCache: {},
|
cachedWebfingers: {}, personCache: {},
|
||||||
postJsonObject: {}, debug: bool,
|
postJsonObject: {}, debug: bool,
|
||||||
project_version: str,
|
project_version: str,
|
||||||
|
@ -3001,7 +3001,7 @@ def _sendToNamedAddresses(session, base_dir: str,
|
||||||
toNickname, toDomain, toPort,
|
toNickname, toDomain, toPort,
|
||||||
cc, fromHttpPrefix, True, client_to_server,
|
cc, fromHttpPrefix, True, client_to_server,
|
||||||
federationList,
|
federationList,
|
||||||
sendThreads, postLog, cachedWebfingers,
|
send_threads, postLog, cachedWebfingers,
|
||||||
personCache, debug, project_version,
|
personCache, debug, project_version,
|
||||||
sharedItemsToken, groupAccount,
|
sharedItemsToken, groupAccount,
|
||||||
signingPrivateKeyPem, 34436782)
|
signingPrivateKeyPem, 34436782)
|
||||||
|
@ -3011,7 +3011,7 @@ def sendToNamedAddressesThread(session, base_dir: str,
|
||||||
nickname: str, domain: str,
|
nickname: str, domain: str,
|
||||||
onion_domain: str, i2p_domain: str, port: int,
|
onion_domain: str, i2p_domain: str, port: int,
|
||||||
http_prefix: str, federationList: [],
|
http_prefix: str, federationList: [],
|
||||||
sendThreads: [], postLog: [],
|
send_threads: [], postLog: [],
|
||||||
cachedWebfingers: {}, personCache: {},
|
cachedWebfingers: {}, personCache: {},
|
||||||
postJsonObject: {}, debug: bool,
|
postJsonObject: {}, debug: bool,
|
||||||
project_version: str,
|
project_version: str,
|
||||||
|
@ -3026,7 +3026,7 @@ def sendToNamedAddressesThread(session, base_dir: str,
|
||||||
nickname, domain,
|
nickname, domain,
|
||||||
onion_domain, i2p_domain, port,
|
onion_domain, i2p_domain, port,
|
||||||
http_prefix, federationList,
|
http_prefix, federationList,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
cachedWebfingers, personCache,
|
cachedWebfingers, personCache,
|
||||||
postJsonObject, debug,
|
postJsonObject, debug,
|
||||||
project_version,
|
project_version,
|
||||||
|
@ -3087,7 +3087,7 @@ def sendToFollowers(session, base_dir: str,
|
||||||
domain: str,
|
domain: str,
|
||||||
onion_domain: str, i2p_domain: str, port: int,
|
onion_domain: str, i2p_domain: str, port: int,
|
||||||
http_prefix: str, federationList: [],
|
http_prefix: str, federationList: [],
|
||||||
sendThreads: [], postLog: [],
|
send_threads: [], postLog: [],
|
||||||
cachedWebfingers: {}, personCache: {},
|
cachedWebfingers: {}, personCache: {},
|
||||||
postJsonObject: {}, debug: bool,
|
postJsonObject: {}, debug: bool,
|
||||||
project_version: str,
|
project_version: str,
|
||||||
|
@ -3211,7 +3211,7 @@ def sendToFollowers(session, base_dir: str,
|
||||||
toNickname, toDomain, toPort,
|
toNickname, toDomain, toPort,
|
||||||
cc, fromHttpPrefix, True, client_to_server,
|
cc, fromHttpPrefix, True, client_to_server,
|
||||||
federationList,
|
federationList,
|
||||||
sendThreads, postLog, cachedWebfingers,
|
send_threads, postLog, cachedWebfingers,
|
||||||
personCache, debug, project_version,
|
personCache, debug, project_version,
|
||||||
sharedItemsToken, groupAccount,
|
sharedItemsToken, groupAccount,
|
||||||
signingPrivateKeyPem, 639342)
|
signingPrivateKeyPem, 639342)
|
||||||
|
@ -3240,7 +3240,7 @@ def sendToFollowers(session, base_dir: str,
|
||||||
toNickname, toDomain, toPort,
|
toNickname, toDomain, toPort,
|
||||||
cc, fromHttpPrefix, True, client_to_server,
|
cc, fromHttpPrefix, True, client_to_server,
|
||||||
federationList,
|
federationList,
|
||||||
sendThreads, postLog, cachedWebfingers,
|
send_threads, postLog, cachedWebfingers,
|
||||||
personCache, debug, project_version,
|
personCache, debug, project_version,
|
||||||
sharedItemsToken, groupAccount,
|
sharedItemsToken, groupAccount,
|
||||||
signingPrivateKeyPem, 634219)
|
signingPrivateKeyPem, 634219)
|
||||||
|
@ -3260,7 +3260,7 @@ def sendToFollowersThread(session, base_dir: str,
|
||||||
domain: str,
|
domain: str,
|
||||||
onion_domain: str, i2p_domain: str, port: int,
|
onion_domain: str, i2p_domain: str, port: int,
|
||||||
http_prefix: str, federationList: [],
|
http_prefix: str, federationList: [],
|
||||||
sendThreads: [], postLog: [],
|
send_threads: [], postLog: [],
|
||||||
cachedWebfingers: {}, personCache: {},
|
cachedWebfingers: {}, personCache: {},
|
||||||
postJsonObject: {}, debug: bool,
|
postJsonObject: {}, debug: bool,
|
||||||
project_version: str,
|
project_version: str,
|
||||||
|
@ -3275,7 +3275,7 @@ def sendToFollowersThread(session, base_dir: str,
|
||||||
nickname, domain,
|
nickname, domain,
|
||||||
onion_domain, i2p_domain, port,
|
onion_domain, i2p_domain, port,
|
||||||
http_prefix, federationList,
|
http_prefix, federationList,
|
||||||
sendThreads, postLog,
|
send_threads, postLog,
|
||||||
cachedWebfingers, personCache,
|
cachedWebfingers, personCache,
|
||||||
postJsonObject.copy(), debug,
|
postJsonObject.copy(), debug,
|
||||||
project_version,
|
project_version,
|
||||||
|
|
|
@ -67,7 +67,7 @@ def _reaction(recentPostsCache: {},
|
||||||
objectUrl: str, emojiContent: str,
|
objectUrl: str, emojiContent: str,
|
||||||
actorReaction: str,
|
actorReaction: str,
|
||||||
client_to_server: bool,
|
client_to_server: bool,
|
||||||
sendThreads: [], postLog: [],
|
send_threads: [], postLog: [],
|
||||||
personCache: {}, cachedWebfingers: {},
|
personCache: {}, cachedWebfingers: {},
|
||||||
debug: bool, project_version: str,
|
debug: bool, project_version: str,
|
||||||
signingPrivateKeyPem: str) -> {}:
|
signingPrivateKeyPem: str) -> {}:
|
||||||
|
@ -138,7 +138,7 @@ def _reaction(recentPostsCache: {},
|
||||||
reactionPostDomain, reactionPostPort,
|
reactionPostDomain, reactionPostPort,
|
||||||
'https://www.w3.org/ns/activitystreams#Public',
|
'https://www.w3.org/ns/activitystreams#Public',
|
||||||
http_prefix, True, client_to_server, federationList,
|
http_prefix, True, client_to_server, federationList,
|
||||||
sendThreads, postLog, cachedWebfingers, personCache,
|
send_threads, postLog, cachedWebfingers, personCache,
|
||||||
debug, project_version, None, groupAccount,
|
debug, project_version, None, groupAccount,
|
||||||
signingPrivateKeyPem, 7165392)
|
signingPrivateKeyPem, 7165392)
|
||||||
|
|
||||||
|
@ -152,7 +152,7 @@ def reactionPost(recentPostsCache: {},
|
||||||
ccList: [],
|
ccList: [],
|
||||||
reactionStatusNumber: int, emojiContent: str,
|
reactionStatusNumber: int, emojiContent: str,
|
||||||
client_to_server: bool,
|
client_to_server: bool,
|
||||||
sendThreads: [], postLog: [],
|
send_threads: [], postLog: [],
|
||||||
personCache: {}, cachedWebfingers: {},
|
personCache: {}, cachedWebfingers: {},
|
||||||
debug: bool, project_version: str,
|
debug: bool, project_version: str,
|
||||||
signingPrivateKeyPem: str) -> {}:
|
signingPrivateKeyPem: str) -> {}:
|
||||||
|
@ -169,7 +169,7 @@ def reactionPost(recentPostsCache: {},
|
||||||
nickname, domain, port,
|
nickname, domain, port,
|
||||||
ccList, http_prefix, objectUrl, emojiContent,
|
ccList, http_prefix, objectUrl, emojiContent,
|
||||||
actorReaction, client_to_server,
|
actorReaction, client_to_server,
|
||||||
sendThreads, postLog, personCache, cachedWebfingers,
|
send_threads, postLog, personCache, cachedWebfingers,
|
||||||
debug, project_version, signingPrivateKeyPem)
|
debug, project_version, signingPrivateKeyPem)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,7 @@ def _updatePostSchedule(base_dir: str, handle: str, httpd,
|
||||||
httpd.recentPostsCache,
|
httpd.recentPostsCache,
|
||||||
httpd.followersThreads,
|
httpd.followersThreads,
|
||||||
httpd.federationList,
|
httpd.federationList,
|
||||||
httpd.sendThreads,
|
httpd.send_threads,
|
||||||
httpd.postLog,
|
httpd.postLog,
|
||||||
httpd.cachedWebfingers,
|
httpd.cachedWebfingers,
|
||||||
httpd.personCache,
|
httpd.personCache,
|
||||||
|
|
16
tests.py
16
tests.py
|
@ -681,7 +681,7 @@ def _testThreads():
|
||||||
def createServerAlice(path: str, domain: str, port: int,
|
def createServerAlice(path: str, domain: str, port: int,
|
||||||
bobAddress: str, federationList: [],
|
bobAddress: str, federationList: [],
|
||||||
hasFollows: bool, hasPosts: bool,
|
hasFollows: bool, hasPosts: bool,
|
||||||
sendThreads: []):
|
send_threads: []):
|
||||||
print('Creating test server: Alice on port ' + str(port))
|
print('Creating test server: Alice on port ' + str(port))
|
||||||
if os.path.isdir(path):
|
if os.path.isdir(path):
|
||||||
shutil.rmtree(path, ignore_errors=False, onerror=None)
|
shutil.rmtree(path, ignore_errors=False, onerror=None)
|
||||||
|
@ -818,14 +818,14 @@ def createServerAlice(path: str, domain: str, port: int,
|
||||||
http_prefix, federationList, max_mentions, max_emoji, False,
|
http_prefix, federationList, max_mentions, max_emoji, False,
|
||||||
proxy_type, max_replies,
|
proxy_type, max_replies,
|
||||||
domain_max_posts_per_day, account_max_posts_per_day,
|
domain_max_posts_per_day, account_max_posts_per_day,
|
||||||
allow_deletion, True, True, False, sendThreads,
|
allow_deletion, True, True, False, send_threads,
|
||||||
False)
|
False)
|
||||||
|
|
||||||
|
|
||||||
def createServerBob(path: str, domain: str, port: int,
|
def createServerBob(path: str, domain: str, port: int,
|
||||||
aliceAddress: str, federationList: [],
|
aliceAddress: str, federationList: [],
|
||||||
hasFollows: bool, hasPosts: bool,
|
hasFollows: bool, hasPosts: bool,
|
||||||
sendThreads: []):
|
send_threads: []):
|
||||||
print('Creating test server: Bob on port ' + str(port))
|
print('Creating test server: Bob on port ' + str(port))
|
||||||
if os.path.isdir(path):
|
if os.path.isdir(path):
|
||||||
shutil.rmtree(path, ignore_errors=False, onerror=None)
|
shutil.rmtree(path, ignore_errors=False, onerror=None)
|
||||||
|
@ -960,13 +960,13 @@ def createServerBob(path: str, domain: str, port: int,
|
||||||
http_prefix, federationList, max_mentions, max_emoji, False,
|
http_prefix, federationList, max_mentions, max_emoji, False,
|
||||||
proxy_type, max_replies,
|
proxy_type, max_replies,
|
||||||
domain_max_posts_per_day, account_max_posts_per_day,
|
domain_max_posts_per_day, account_max_posts_per_day,
|
||||||
allow_deletion, True, True, False, sendThreads,
|
allow_deletion, True, True, False, send_threads,
|
||||||
False)
|
False)
|
||||||
|
|
||||||
|
|
||||||
def createServerEve(path: str, domain: str, port: int, federationList: [],
|
def createServerEve(path: str, domain: str, port: int, federationList: [],
|
||||||
hasFollows: bool, hasPosts: bool,
|
hasFollows: bool, hasPosts: bool,
|
||||||
sendThreads: []):
|
send_threads: []):
|
||||||
print('Creating test server: Eve on port ' + str(port))
|
print('Creating test server: Eve on port ' + str(port))
|
||||||
if os.path.isdir(path):
|
if os.path.isdir(path):
|
||||||
shutil.rmtree(path, ignore_errors=False, onerror=None)
|
shutil.rmtree(path, ignore_errors=False, onerror=None)
|
||||||
|
@ -1029,13 +1029,13 @@ def createServerEve(path: str, domain: str, port: int, federationList: [],
|
||||||
onion_domain, i2p_domain, None, None, port, port,
|
onion_domain, i2p_domain, None, None, port, port,
|
||||||
http_prefix, federationList, max_mentions, max_emoji, False,
|
http_prefix, federationList, max_mentions, max_emoji, False,
|
||||||
proxy_type, max_replies, allow_deletion, True, True, False,
|
proxy_type, max_replies, allow_deletion, True, True, False,
|
||||||
sendThreads, False)
|
send_threads, False)
|
||||||
|
|
||||||
|
|
||||||
def createServerGroup(path: str, domain: str, port: int,
|
def createServerGroup(path: str, domain: str, port: int,
|
||||||
federationList: [],
|
federationList: [],
|
||||||
hasFollows: bool, hasPosts: bool,
|
hasFollows: bool, hasPosts: bool,
|
||||||
sendThreads: []):
|
send_threads: []):
|
||||||
print('Creating test server: Group on port ' + str(port))
|
print('Creating test server: Group on port ' + str(port))
|
||||||
if os.path.isdir(path):
|
if os.path.isdir(path):
|
||||||
shutil.rmtree(path, ignore_errors=False, onerror=None)
|
shutil.rmtree(path, ignore_errors=False, onerror=None)
|
||||||
|
@ -1102,7 +1102,7 @@ def createServerGroup(path: str, domain: str, port: int,
|
||||||
http_prefix, federationList, max_mentions, max_emoji, False,
|
http_prefix, federationList, max_mentions, max_emoji, False,
|
||||||
proxy_type, max_replies,
|
proxy_type, max_replies,
|
||||||
domain_max_posts_per_day, account_max_posts_per_day,
|
domain_max_posts_per_day, account_max_posts_per_day,
|
||||||
allow_deletion, True, True, False, sendThreads,
|
allow_deletion, True, True, False, send_threads,
|
||||||
False)
|
False)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue