Snake case

merge-requests/30/head
Bob Mottram 2021-12-25 20:39:35 +00:00
parent e453d373b6
commit 0203107e1a
10 changed files with 94 additions and 94 deletions

View File

@ -119,7 +119,7 @@ def createAnnounce(session, base_dir: str, federationList: [],
nickname: str, domain: str, port: int,
toUrl: str, ccUrl: str, http_prefix: str,
objectUrl: str, saveToFile: bool,
clientToServer: bool,
client_to_server: bool,
sendThreads: [], postLog: [],
personCache: {}, cachedWebfingers: {},
debug: bool, project_version: str,
@ -178,7 +178,7 @@ def createAnnounce(session, base_dir: str, federationList: [],
sendSignedJson(newAnnounce, session, base_dir,
nickname, domain, port,
announceNickname, announceDomain, announcePort, None,
http_prefix, True, clientToServer, federationList,
http_prefix, True, client_to_server, federationList,
sendThreads, postLog, cachedWebfingers, personCache,
debug, project_version, None, groupAccount,
signingPrivateKeyPem, 639633)
@ -188,7 +188,7 @@ def createAnnounce(session, base_dir: str, federationList: [],
def announcePublic(session, base_dir: str, federationList: [],
nickname: str, domain: str, port: int, http_prefix: str,
objectUrl: str, clientToServer: bool,
objectUrl: str, client_to_server: bool,
sendThreads: [], postLog: [],
personCache: {}, cachedWebfingers: {},
debug: bool, project_version: str,
@ -202,7 +202,7 @@ def announcePublic(session, base_dir: str, federationList: [],
return createAnnounce(session, base_dir, federationList,
nickname, domain, port,
toUrl, ccUrl, http_prefix,
objectUrl, True, clientToServer,
objectUrl, True, client_to_server,
sendThreads, postLog,
personCache, cachedWebfingers,
debug, project_version,

View File

@ -251,7 +251,7 @@ def bookmark(recentPostsCache: {},
nickname: str, domain: str, port: int,
ccList: [], http_prefix: str,
objectUrl: str, actorBookmarked: str,
clientToServer: bool,
client_to_server: bool,
sendThreads: [], postLog: [],
personCache: {}, cachedWebfingers: {},
debug: bool, project_version: str) -> {}:
@ -310,7 +310,7 @@ def undoBookmark(recentPostsCache: {},
nickname: str, domain: str, port: int,
ccList: [], http_prefix: str,
objectUrl: str, actorBookmarked: str,
clientToServer: bool,
client_to_server: bool,
sendThreads: [], postLog: [],
personCache: {}, cachedWebfingers: {},
debug: bool, project_version: str) -> {}:

View File

@ -16683,7 +16683,7 @@ class PubServer(BaseHTTPRequestHandler):
# submit button on newblog screen
followersOnly = False
saveToFile = False
clientToServer = False
client_to_server = False
city = None
conversationId = None
if fields.get('conversationId'):
@ -16694,7 +16694,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.http_prefix,
fields['message'],
followersOnly, saveToFile,
clientToServer, commentsEnabled,
client_to_server, commentsEnabled,
filename, attachmentMediaType,
fields['imageDescription'],
city,
@ -16831,7 +16831,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.domain)
followersOnly = False
saveToFile = False
clientToServer = False
client_to_server = False
conversationId = None
if fields.get('conversationId'):
@ -16844,7 +16844,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.http_prefix,
mentionsStr + fields['message'],
followersOnly, saveToFile,
clientToServer, commentsEnabled,
client_to_server, commentsEnabled,
filename, attachmentMediaType,
fields['imageDescription'],
city,
@ -16881,7 +16881,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.domain)
followersOnly = True
saveToFile = False
clientToServer = False
client_to_server = False
conversationId = None
if fields.get('conversationId'):
@ -16895,7 +16895,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.http_prefix,
mentionsStr + fields['message'],
followersOnly, saveToFile,
clientToServer,
client_to_server,
commentsEnabled,
filename, attachmentMediaType,
fields['imageDescription'],
@ -16936,7 +16936,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.domain)
followersOnly = True
saveToFile = False
clientToServer = False
client_to_server = False
conversationId = None
if fields.get('conversationId'):
@ -16952,7 +16952,7 @@ class PubServer(BaseHTTPRequestHandler):
mentionsStr +
fields['message'],
followersOnly, saveToFile,
clientToServer,
client_to_server,
commentsEnabled,
filename, attachmentMediaType,
fields['imageDescription'],
@ -16997,7 +16997,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.domain)
followersOnly = True
saveToFile = False
clientToServer = False
client_to_server = False
commentsEnabled = False
conversationId = None
messageJson = \
@ -17008,7 +17008,7 @@ class PubServer(BaseHTTPRequestHandler):
self.server.http_prefix,
mentionsStr + fields['message'],
followersOnly, saveToFile,
clientToServer, commentsEnabled,
client_to_server, commentsEnabled,
filename, attachmentMediaType,
fields['imageDescription'],
city,
@ -18456,7 +18456,7 @@ def runDaemon(content_license_url: str,
max_recent_posts: int,
enable_shared_inbox: bool, registration: bool,
language: str, project_version: str,
instance_id: str, clientToServer: bool,
instance_id: str, client_to_server: bool,
base_dir: str, domain: str,
onionDomain: str, i2pDomain: str,
yt_replace_domain: str,
@ -18998,7 +18998,7 @@ def runDaemon(content_license_url: str,
print('Starting federated shares daemon')
httpd.thrFederatedSharesDaemon.start()
if clientToServer:
if client_to_server:
print('Running ActivityPub client on ' +
domain + ' port ' + str(proxyPort))
else:

View File

@ -1292,7 +1292,7 @@ if args.message:
ccUrl = None
sendMessage = args.message
followersOnly = args.followersonly
clientToServer = args.client
client_to_server = args.client
attachedImageDescription = args.imageDescription
city = 'London, England'
sendThreads = []

View File

@ -744,7 +744,7 @@ def followedAccountAccepts(session, base_dir: str, http_prefix: str,
nicknameToFollow + '@' + domainToFollow +
' port ' + str(port) + ' to ' +
acceptHandle + ' port ' + str(fromPort))
clientToServer = False
client_to_server = False
if removeFollowActivity:
# remove the follow request json
@ -768,7 +768,7 @@ def followedAccountAccepts(session, base_dir: str, http_prefix: str,
return sendSignedJson(acceptJson, session, base_dir,
nicknameToFollow, domainToFollow, port,
nickname, domain, fromPort, '',
http_prefix, True, clientToServer,
http_prefix, True, client_to_server,
federationList,
sendThreads, postLog, cachedWebfingers,
personCache, debug, project_version, None,
@ -818,7 +818,7 @@ def followedAccountRejects(session, base_dir: str, http_prefix: str,
nicknameToFollow + '@' + domainToFollow +
' port ' + str(port) + ' to ' +
nickname + '@' + domain + ' port ' + str(fromPort))
clientToServer = False
client_to_server = False
denyHandle = getFullDomain(nickname + '@' + domain, fromPort)
groupAccount = False
if hasGroupType(base_dir, personUrl, personCache):
@ -836,7 +836,7 @@ def followedAccountRejects(session, base_dir: str, http_prefix: str,
return sendSignedJson(rejectJson, session, base_dir,
nicknameToFollow, domainToFollow, port,
nickname, domain, fromPort, '',
http_prefix, True, clientToServer,
http_prefix, True, client_to_server,
federationList,
sendThreads, postLog, cachedWebfingers,
personCache, debug, project_version, None,
@ -849,7 +849,7 @@ def sendFollowRequest(session, base_dir: str,
followNickname: str, followDomain: str,
followedActor: str,
followPort: int, followHttpPrefix: str,
clientToServer: bool, federationList: [],
client_to_server: bool, federationList: [],
sendThreads: [], postLog: [], cachedWebfingers: {},
personCache: {}, debug: bool,
project_version: str, signingPrivateKeyPem: str) -> {}:
@ -928,7 +928,7 @@ def sendFollowRequest(session, base_dir: str,
sendSignedJson(newFollowJson, session, base_dir, nickname, domain, port,
followNickname, followDomain, followPort,
'https://www.w3.org/ns/activitystreams#Public',
http_prefix, True, clientToServer,
http_prefix, True, client_to_server,
federationList,
sendThreads, postLog, cachedWebfingers, personCache,
debug, project_version, None, groupAccount,

View File

@ -2830,7 +2830,7 @@ def _bounceDM(senderPostId: str, session, http_prefix: str,
content = translate['DM bounce']
followersOnly = False
saveToFile = False
clientToServer = False
client_to_server = False
commentsEnabled = False
attachImageFilename = None
mediaType = None
@ -2847,7 +2847,7 @@ def _bounceDM(senderPostId: str, session, http_prefix: str,
postJsonObject = \
createDirectMessagePost(base_dir, nickname, domain, port,
http_prefix, content, followersOnly,
saveToFile, clientToServer,
saveToFile, client_to_server,
commentsEnabled,
attachImageFilename, mediaType,
imageDescription, city,

View File

@ -73,7 +73,7 @@ def _like(recentPostsCache: {},
nickname: str, domain: str, port: int,
ccList: [], http_prefix: str,
objectUrl: str, actorLiked: str,
clientToServer: bool,
client_to_server: bool,
sendThreads: [], postLog: [],
personCache: {}, cachedWebfingers: {},
debug: bool, project_version: str,
@ -135,7 +135,7 @@ def _like(recentPostsCache: {},
nickname, domain, port,
likedPostNickname, likedPostDomain, likedPostPort,
'https://www.w3.org/ns/activitystreams#Public',
http_prefix, True, clientToServer, federationList,
http_prefix, True, client_to_server, federationList,
sendThreads, postLog, cachedWebfingers, personCache,
debug, project_version, None, groupAccount,
signingPrivateKeyPem, 7367374)
@ -148,7 +148,7 @@ def likePost(recentPostsCache: {},
nickname: str, domain: str, port: int, http_prefix: str,
likeNickname: str, likeDomain: str, likePort: int,
ccList: [],
likeStatusNumber: int, clientToServer: bool,
likeStatusNumber: int, client_to_server: bool,
sendThreads: [], postLog: [],
personCache: {}, cachedWebfingers: {},
debug: bool, project_version: str,
@ -162,7 +162,7 @@ def likePost(recentPostsCache: {},
return _like(recentPostsCache,
session, base_dir, federationList, nickname, domain, port,
ccList, http_prefix, objectUrl, actorLiked, clientToServer,
ccList, http_prefix, objectUrl, actorLiked, client_to_server,
sendThreads, postLog, personCache, cachedWebfingers,
debug, project_version, signingPrivateKeyPem)

View File

@ -1363,7 +1363,7 @@ def _createPostBase(base_dir: str,
nickname: str, domain: str, port: int,
toUrl: str, ccUrl: str, http_prefix: str, content: str,
followersOnly: bool, saveToFile: bool,
clientToServer: bool, commentsEnabled: bool,
client_to_server: bool, commentsEnabled: bool,
attachImageFilename: str,
mediaType: str, imageDescription: str, city: str,
isModerationReport: bool,
@ -1506,7 +1506,7 @@ def _createPostBase(base_dir: str,
if isArticle:
postObjectType = 'Article'
if not clientToServer:
if not client_to_server:
newPost = \
_createPostS2S(base_dir, nickname, domain, port,
http_prefix, content, statusNumber,
@ -1757,7 +1757,7 @@ def regenerateIndexForBox(base_dir: str,
def createPublicPost(base_dir: str,
nickname: str, domain: str, port: int, http_prefix: str,
content: str, followersOnly: bool, saveToFile: bool,
clientToServer: bool, commentsEnabled: bool,
client_to_server: bool, commentsEnabled: bool,
attachImageFilename: str, mediaType: str,
imageDescription: str, city: str,
inReplyTo: str,
@ -1788,7 +1788,7 @@ def createPublicPost(base_dir: str,
'https://www.w3.org/ns/activitystreams#Public',
localActor + '/followers',
http_prefix, content, followersOnly, saveToFile,
clientToServer, commentsEnabled,
client_to_server, commentsEnabled,
attachImageFilename, mediaType,
imageDescription, city,
isModerationReport, isArticle,
@ -1836,7 +1836,7 @@ def _appendCitationsToBlogPost(base_dir: str,
def createBlogPost(base_dir: str,
nickname: str, domain: str, port: int, http_prefix: str,
content: str, followersOnly: bool, saveToFile: bool,
clientToServer: bool, commentsEnabled: bool,
client_to_server: bool, commentsEnabled: bool,
attachImageFilename: str, mediaType: str,
imageDescription: str, city: str,
inReplyTo: str, inReplyToAtomUri: str,
@ -1849,7 +1849,7 @@ def createBlogPost(base_dir: str,
createPublicPost(base_dir,
nickname, domain, port, http_prefix,
content, followersOnly, saveToFile,
clientToServer, commentsEnabled,
client_to_server, commentsEnabled,
attachImageFilename, mediaType,
imageDescription, city,
inReplyTo, inReplyToAtomUri, subject,
@ -1872,7 +1872,7 @@ def createNewsPost(base_dir: str,
subject: str, systemLanguage: str,
conversationId: str, low_bandwidth: bool,
content_license_url: str) -> {}:
clientToServer = False
client_to_server = False
inReplyTo = None
inReplyToAtomUri = None
schedulePost = False
@ -1883,7 +1883,7 @@ def createNewsPost(base_dir: str,
createPublicPost(base_dir,
'news', domain, port, http_prefix,
content, followersOnly, saveToFile,
clientToServer, False,
client_to_server, False,
attachImageFilename, mediaType,
imageDescription, city,
inReplyTo, inReplyToAtomUri, subject,
@ -1899,7 +1899,7 @@ def createQuestionPost(base_dir: str,
nickname: str, domain: str, port: int, http_prefix: str,
content: str, qOptions: [],
followersOnly: bool, saveToFile: bool,
clientToServer: bool, commentsEnabled: bool,
client_to_server: bool, commentsEnabled: bool,
attachImageFilename: str, mediaType: str,
imageDescription: str, city: str,
subject: str, durationDays: int,
@ -1914,7 +1914,7 @@ def createQuestionPost(base_dir: str,
'https://www.w3.org/ns/activitystreams#Public',
localActor + '/followers',
http_prefix, content, followersOnly, saveToFile,
clientToServer, commentsEnabled,
client_to_server, commentsEnabled,
attachImageFilename, mediaType,
imageDescription, city,
False, False, None, None, subject,
@ -1946,7 +1946,7 @@ def createQuestionPost(base_dir: str,
def createUnlistedPost(base_dir: str,
nickname: str, domain: str, port: int, http_prefix: str,
content: str, followersOnly: bool, saveToFile: bool,
clientToServer: bool, commentsEnabled: bool,
client_to_server: bool, commentsEnabled: bool,
attachImageFilename: str, mediaType: str,
imageDescription: str, city: str,
inReplyTo: str, inReplyToAtomUri: str,
@ -1963,7 +1963,7 @@ def createUnlistedPost(base_dir: str,
localActor + '/followers',
'https://www.w3.org/ns/activitystreams#Public',
http_prefix, content, followersOnly, saveToFile,
clientToServer, commentsEnabled,
client_to_server, commentsEnabled,
attachImageFilename, mediaType,
imageDescription, city,
False, False,
@ -1980,7 +1980,7 @@ def createFollowersOnlyPost(base_dir: str,
http_prefix: str,
content: str, followersOnly: bool,
saveToFile: bool,
clientToServer: bool, commentsEnabled: bool,
client_to_server: bool, commentsEnabled: bool,
attachImageFilename: str, mediaType: str,
imageDescription: str, city: str,
inReplyTo: str,
@ -1998,7 +1998,7 @@ def createFollowersOnlyPost(base_dir: str,
localActor + '/followers',
None,
http_prefix, content, followersOnly, saveToFile,
clientToServer, commentsEnabled,
client_to_server, commentsEnabled,
attachImageFilename, mediaType,
imageDescription, city,
False, False,
@ -2049,7 +2049,7 @@ def createDirectMessagePost(base_dir: str,
nickname: str, domain: str, port: int,
http_prefix: str,
content: str, followersOnly: bool,
saveToFile: bool, clientToServer: bool,
saveToFile: bool, client_to_server: bool,
commentsEnabled: bool,
attachImageFilename: str, mediaType: str,
imageDescription: str, city: str,
@ -2076,7 +2076,7 @@ def createDirectMessagePost(base_dir: str,
_createPostBase(base_dir, nickname, domain, port,
postTo, postCc,
http_prefix, content, followersOnly, saveToFile,
clientToServer, commentsEnabled,
client_to_server, commentsEnabled,
attachImageFilename, mediaType,
imageDescription, city,
False, False,
@ -2101,7 +2101,7 @@ def createDirectMessagePost(base_dir: str,
def createReportPost(base_dir: str,
nickname: str, domain: str, port: int, http_prefix: str,
content: str, followersOnly: bool, saveToFile: bool,
clientToServer: bool, commentsEnabled: bool,
client_to_server: bool, commentsEnabled: bool,
attachImageFilename: str, mediaType: str,
imageDescription: str, city: str,
debug: bool, subject: str, systemLanguage: str,
@ -2173,7 +2173,7 @@ def createReportPost(base_dir: str,
_createPostBase(base_dir, nickname, domain, port,
toUrl, postCc,
http_prefix, content, followersOnly, saveToFile,
clientToServer, commentsEnabled,
client_to_server, commentsEnabled,
attachImageFilename, mediaType,
imageDescription, city,
True, False, None, None, subject,
@ -2267,7 +2267,7 @@ def sendPost(signingPrivateKeyPem: str, project_version: str,
session, base_dir: str, nickname: str, domain: str, port: int,
toNickname: str, toDomain: str, toPort: int, cc: str,
http_prefix: str, content: str, followersOnly: bool,
saveToFile: bool, clientToServer: bool,
saveToFile: bool, client_to_server: bool,
commentsEnabled: bool,
attachImageFilename: str, mediaType: str,
imageDescription: str, city: str,
@ -2304,7 +2304,7 @@ def sendPost(signingPrivateKeyPem: str, project_version: str,
str(wfRequest))
return 1
if not clientToServer:
if not client_to_server:
postToBox = 'inbox'
else:
postToBox = 'outbox'
@ -2333,7 +2333,7 @@ def sendPost(signingPrivateKeyPem: str, project_version: str,
postJsonObject = \
_createPostBase(base_dir, nickname, domain, port,
toPersonId, cc, http_prefix, content,
followersOnly, saveToFile, clientToServer,
followersOnly, saveToFile, client_to_server,
commentsEnabled,
attachImageFilename, mediaType,
imageDescription, city,
@ -2483,7 +2483,7 @@ def sendPostViaServer(signingPrivateKeyPem: str, project_version: str,
# Get the json for the c2s post, not saving anything to file
# Note that base_dir is set to None
saveToFile = False
clientToServer = True
client_to_server = True
if toDomain.lower().endswith('public'):
toPersonId = 'https://www.w3.org/ns/activitystreams#Public'
cc = localActorUrl(http_prefix, fromNickname, fromDomainFull) + \
@ -2502,7 +2502,7 @@ def sendPostViaServer(signingPrivateKeyPem: str, project_version: str,
_createPostBase(base_dir,
fromNickname, fromDomain, fromPort,
toPersonId, cc, http_prefix, content,
followersOnly, saveToFile, clientToServer,
followersOnly, saveToFile, client_to_server,
commentsEnabled,
attachImageFilename, mediaType,
imageDescription, city,
@ -2610,7 +2610,7 @@ def _addFollowersToPublicPost(postJsonObject: {}) -> None:
def sendSignedJson(postJsonObject: {}, session, base_dir: str,
nickname: str, domain: str, port: int,
toNickname: str, toDomain: str, toPort: int, cc: str,
http_prefix: str, saveToFile: bool, clientToServer: bool,
http_prefix: str, saveToFile: bool, client_to_server: bool,
federationList: [],
sendThreads: [], postLog: [], cachedWebfingers: {},
personCache: {}, debug: bool, project_version: str,
@ -2668,7 +2668,7 @@ def sendSignedJson(postJsonObject: {}, session, base_dir: str,
print('DEBUG: webfinger for ' + handle +
' failed with errors ' + str(wfRequest['errors']))
if not clientToServer:
if not client_to_server:
postToBox = 'inbox'
else:
postToBox = 'outbox'
@ -2944,7 +2944,7 @@ def _sendToNamedAddresses(session, base_dir: str,
print('DEBUG: Sending individually addressed posts: ' +
str(recipients))
# this is after the message has arrived at the server
clientToServer = False
client_to_server = False
for address in recipients:
toNickname = getNicknameFromActor(address)
if not toNickname:
@ -2999,7 +2999,7 @@ def _sendToNamedAddresses(session, base_dir: str,
sendSignedJson(postJsonObject, session, base_dir,
nickname, fromDomain, port,
toNickname, toDomain, toPort,
cc, fromHttpPrefix, True, clientToServer,
cc, fromHttpPrefix, True, client_to_server,
federationList,
sendThreads, postLog, cachedWebfingers,
personCache, debug, project_version,
@ -3117,7 +3117,7 @@ def sendToFollowers(session, base_dir: str,
# print(str(grouped))
# this is after the message has arrived at the server
clientToServer = False
client_to_server = False
# for each instance
sendingStartTime = datetime.datetime.utcnow()
@ -3209,7 +3209,7 @@ def sendToFollowers(session, base_dir: str,
sendSignedJson(postJsonObject, session, base_dir,
nickname, fromDomain, port,
toNickname, toDomain, toPort,
cc, fromHttpPrefix, True, clientToServer,
cc, fromHttpPrefix, True, client_to_server,
federationList,
sendThreads, postLog, cachedWebfingers,
personCache, debug, project_version,
@ -3238,7 +3238,7 @@ def sendToFollowers(session, base_dir: str,
sendSignedJson(postJsonObject, session, base_dir,
nickname, fromDomain, port,
toNickname, toDomain, toPort,
cc, fromHttpPrefix, True, clientToServer,
cc, fromHttpPrefix, True, client_to_server,
federationList,
sendThreads, postLog, cachedWebfingers,
personCache, debug, project_version,

View File

@ -66,7 +66,7 @@ def _reaction(recentPostsCache: {},
ccList: [], http_prefix: str,
objectUrl: str, emojiContent: str,
actorReaction: str,
clientToServer: bool,
client_to_server: bool,
sendThreads: [], postLog: [],
personCache: {}, cachedWebfingers: {},
debug: bool, project_version: str,
@ -137,7 +137,7 @@ def _reaction(recentPostsCache: {},
reactionPostNickname,
reactionPostDomain, reactionPostPort,
'https://www.w3.org/ns/activitystreams#Public',
http_prefix, True, clientToServer, federationList,
http_prefix, True, client_to_server, federationList,
sendThreads, postLog, cachedWebfingers, personCache,
debug, project_version, None, groupAccount,
signingPrivateKeyPem, 7165392)
@ -151,7 +151,7 @@ def reactionPost(recentPostsCache: {},
reactionNickname: str, reactionDomain: str, reactionPort: int,
ccList: [],
reactionStatusNumber: int, emojiContent: str,
clientToServer: bool,
client_to_server: bool,
sendThreads: [], postLog: [],
personCache: {}, cachedWebfingers: {},
debug: bool, project_version: str,
@ -168,7 +168,7 @@ def reactionPost(recentPostsCache: {},
session, base_dir, federationList,
nickname, domain, port,
ccList, http_prefix, objectUrl, emojiContent,
actorReaction, clientToServer,
actorReaction, client_to_server,
sendThreads, postLog, personCache, cachedWebfingers,
debug, project_version, signingPrivateKeyPem)

View File

@ -713,7 +713,7 @@ def createServerAlice(path: str, domain: str, port: int,
if hasPosts:
testFollowersOnly = False
testSaveToFile = True
clientToServer = False
client_to_server = False
testCommentsEnabled = True
testAttachImageFilename = None
testMediaType = None
@ -733,7 +733,7 @@ def createServerAlice(path: str, domain: str, port: int,
"No wise fish would go anywhere without a porpoise",
testFollowersOnly,
testSaveToFile,
clientToServer,
client_to_server,
testCommentsEnabled,
testAttachImageFilename,
testMediaType,
@ -747,7 +747,7 @@ def createServerAlice(path: str, domain: str, port: int,
"Curiouser and curiouser!",
testFollowersOnly,
testSaveToFile,
clientToServer,
client_to_server,
testCommentsEnabled,
testAttachImageFilename,
testMediaType,
@ -762,7 +762,7 @@ def createServerAlice(path: str, domain: str, port: int,
"of dreams, that is where you and I shall meet",
testFollowersOnly,
testSaveToFile,
clientToServer,
client_to_server,
testCommentsEnabled,
testAttachImageFilename,
testMediaType,
@ -836,7 +836,7 @@ def createServerBob(path: str, domain: str, port: int,
nickname = 'bob'
http_prefix = 'http'
proxyType = None
clientToServer = False
client_to_server = False
password = 'bobpass'
maxReplies = 64
domainMaxPostsPerDay = 1000
@ -875,7 +875,7 @@ def createServerBob(path: str, domain: str, port: int,
"It's your life, live it your way.",
testFollowersOnly,
testSaveToFile,
clientToServer,
client_to_server,
testCommentsEnabled,
testAttachImageFilename,
testMediaType,
@ -890,7 +890,7 @@ def createServerBob(path: str, domain: str, port: int,
"I am very simple",
testFollowersOnly,
testSaveToFile,
clientToServer,
client_to_server,
testCommentsEnabled,
testAttachImageFilename,
testMediaType,
@ -904,7 +904,7 @@ def createServerBob(path: str, domain: str, port: int,
"Quantum physics is a bit of a passion of mine",
testFollowersOnly,
testSaveToFile,
clientToServer,
client_to_server,
testCommentsEnabled,
testAttachImageFilename,
testMediaType,
@ -1186,7 +1186,7 @@ def testPostMessageBetweenServers(base_dir: str) -> None:
alicePostLog = []
followersOnly = False
saveToFile = True
clientToServer = False
client_to_server = False
ccUrl = None
alicePersonCache = {}
aliceCachedWebfingers = {}
@ -1214,7 +1214,7 @@ def testPostMessageBetweenServers(base_dir: str) -> None:
'Why is a mouse when it spins? ' +
'यह एक परीक्षण है #sillyquestion',
followersOnly,
saveToFile, clientToServer, True,
saveToFile, client_to_server, True,
attachedImageFilename, mediaType,
attachedImageDescription, city, federationList,
aliceSendThreads, alicePostLog, aliceCachedWebfingers,
@ -1518,7 +1518,7 @@ def testFollowBetweenServers(base_dir: str) -> None:
alicePostLog = []
followersOnly = False
saveToFile = True
clientToServer = False
client_to_server = False
ccUrl = None
alicePersonCache = {}
aliceCachedWebfingers = {}
@ -1530,7 +1530,7 @@ def testFollowBetweenServers(base_dir: str) -> None:
'alice', aliceDomain, alicePort, http_prefix,
'bob', bobDomain, bobActor,
bobPort, http_prefix,
clientToServer, federationList,
client_to_server, federationList,
aliceSendThreads, alicePostLog,
aliceCachedWebfingers, alicePersonCache,
True, __version__, signingPrivateKeyPem)
@ -1576,7 +1576,7 @@ def testFollowBetweenServers(base_dir: str) -> None:
sessionAlice, aliceDir, 'alice', aliceDomain, alicePort,
'bob', bobDomain, bobPort, ccUrl,
http_prefix, 'Alice message', followersOnly, saveToFile,
clientToServer, True,
client_to_server, True,
None, None, None, city, federationList,
aliceSendThreads, alicePostLog, aliceCachedWebfingers,
alicePersonCache, isArticle, systemLanguage,
@ -1736,7 +1736,7 @@ def testSharedItemsFederation(base_dir: str) -> None:
alicePostLog = []
followersOnly = False
saveToFile = True
clientToServer = False
client_to_server = False
ccUrl = None
alicePersonCache = {}
aliceCachedWebfingers = {}
@ -1747,7 +1747,7 @@ def testSharedItemsFederation(base_dir: str) -> None:
'alice', aliceDomain, alicePort, http_prefix,
'bob', bobDomain, bobActor,
bobPort, http_prefix,
clientToServer, federationList,
client_to_server, federationList,
aliceSendThreads, alicePostLog,
aliceCachedWebfingers, alicePersonCache,
True, __version__, signingPrivateKeyPem)
@ -1927,7 +1927,7 @@ def testSharedItemsFederation(base_dir: str) -> None:
sessionAlice, aliceDir, 'alice', aliceDomain, alicePort,
'bob', bobDomain, bobPort, ccUrl,
http_prefix, 'Alice message', followersOnly, saveToFile,
clientToServer, True,
client_to_server, True,
None, None, None, city, federationList,
aliceSendThreads, alicePostLog, aliceCachedWebfingers,
alicePersonCache, isArticle, systemLanguage,
@ -2172,7 +2172,7 @@ def testGroupFollow(base_dir: str) -> None:
alicePostLog = []
followersOnly = False
saveToFile = True
clientToServer = False
client_to_server = False
ccUrl = None
alicePersonCache = {}
aliceCachedWebfingers = {}
@ -2186,7 +2186,7 @@ def testGroupFollow(base_dir: str) -> None:
'alice', aliceDomain, alicePort, http_prefix,
'testgroup', testgroupDomain, testgroupActor,
testgroupPort, http_prefix,
clientToServer, federationList,
client_to_server, federationList,
aliceSendThreads, alicePostLog,
aliceCachedWebfingers, alicePersonCache,
True, __version__, signingPrivateKeyPem)
@ -2249,7 +2249,7 @@ def testGroupFollow(base_dir: str) -> None:
bobPostLog = []
followersOnly = False
saveToFile = True
clientToServer = False
client_to_server = False
ccUrl = None
bobPersonCache = {}
bobCachedWebfingers = {}
@ -2263,7 +2263,7 @@ def testGroupFollow(base_dir: str) -> None:
'bob', bobDomain, bobPort, http_prefix,
'testgroup', testgroupDomain, testgroupActor,
testgroupPort, http_prefix,
clientToServer, federationList,
client_to_server, federationList,
bobSendThreads, bobPostLog,
bobCachedWebfingers, bobPersonCache,
True, __version__, signingPrivateKeyPem)
@ -2350,7 +2350,7 @@ def testGroupFollow(base_dir: str) -> None:
sessionAlice, aliceDir, 'alice', aliceDomain, alicePort,
'testgroup', testgroupDomain, testgroupPort, ccUrl,
http_prefix, "Alice group message", followersOnly,
saveToFile, clientToServer, True,
saveToFile, client_to_server, True,
None, None, None, city, federationList,
aliceSendThreads, alicePostLog, aliceCachedWebfingers,
alicePersonCache, isArticle, systemLanguage,
@ -2676,7 +2676,7 @@ def _testCreatePerson(base_dir: str):
password = 'mypass'
port = 80
http_prefix = 'https'
clientToServer = False
client_to_server = False
base_dir = currDir + '/.tests_createperson'
if os.path.isdir(base_dir):
shutil.rmtree(base_dir, ignore_errors=False, onerror=None)
@ -2711,7 +2711,7 @@ def _testCreatePerson(base_dir: str):
low_bandwidth = True
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
createPublicPost(base_dir, nickname, domain, port, http_prefix,
content, followersOnly, saveToFile, clientToServer,
content, followersOnly, saveToFile, client_to_server,
commentsEnabled, attachImageFilename, mediaType,
'Not suitable for Vogons', 'London, England',
testInReplyTo, testInReplyToAtomUri,
@ -4236,7 +4236,7 @@ def _testReplyToPublicPost(base_dir: str) -> None:
content = "@ninjarodent@rat.site This is a test."
followersOnly = False
saveToFile = False
clientToServer = False
client_to_server = False
commentsEnabled = True
attachImageFilename = None
mediaType = None
@ -4256,7 +4256,7 @@ def _testReplyToPublicPost(base_dir: str) -> None:
reply = \
createPublicPost(base_dir, nickname, domain, port, http_prefix,
content, followersOnly, saveToFile,
clientToServer, commentsEnabled,
client_to_server, commentsEnabled,
attachImageFilename, mediaType,
imageDescription, city, testInReplyTo,
testInReplyToAtomUri,
@ -4781,7 +4781,7 @@ def _testLinksWithinPost(base_dir: str) -> None:
'ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/v4/\n\nhttps://libreserver.org'
followersOnly = False
saveToFile = False
clientToServer = False
client_to_server = False
commentsEnabled = True
attachImageFilename = None
mediaType = None
@ -4802,7 +4802,7 @@ def _testLinksWithinPost(base_dir: str) -> None:
postJsonObject = \
createPublicPost(base_dir, nickname, domain, port, http_prefix,
content, followersOnly, saveToFile,
clientToServer, commentsEnabled,
client_to_server, commentsEnabled,
attachImageFilename, mediaType,
imageDescription, city,
testInReplyTo, testInReplyToAtomUri,
@ -5768,7 +5768,7 @@ def _testCanReplyTo(base_dir: str) -> None:
'ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/v4/\n\nhttps://libreserver.org'
followersOnly = False
saveToFile = False
clientToServer = False
client_to_server = False
commentsEnabled = True
attachImageFilename = None
mediaType = None
@ -5789,7 +5789,7 @@ def _testCanReplyTo(base_dir: str) -> None:
postJsonObject = \
createPublicPost(base_dir, nickname, domain, port, http_prefix,
content, followersOnly, saveToFile,
clientToServer, commentsEnabled,
client_to_server, commentsEnabled,
attachImageFilename, mediaType,
imageDescription, city,
testInReplyTo, testInReplyToAtomUri,