mirror of https://gitlab.com/bashrc2/epicyon
Snake case
parent
e453d373b6
commit
0203107e1a
|
@ -119,7 +119,7 @@ def createAnnounce(session, base_dir: str, federationList: [],
|
||||||
nickname: str, domain: str, port: int,
|
nickname: str, domain: str, port: int,
|
||||||
toUrl: str, ccUrl: str, http_prefix: str,
|
toUrl: str, ccUrl: str, http_prefix: str,
|
||||||
objectUrl: str, saveToFile: bool,
|
objectUrl: str, saveToFile: bool,
|
||||||
clientToServer: bool,
|
client_to_server: bool,
|
||||||
sendThreads: [], postLog: [],
|
sendThreads: [], postLog: [],
|
||||||
personCache: {}, cachedWebfingers: {},
|
personCache: {}, cachedWebfingers: {},
|
||||||
debug: bool, project_version: str,
|
debug: bool, project_version: str,
|
||||||
|
@ -178,7 +178,7 @@ def createAnnounce(session, base_dir: str, federationList: [],
|
||||||
sendSignedJson(newAnnounce, session, base_dir,
|
sendSignedJson(newAnnounce, session, base_dir,
|
||||||
nickname, domain, port,
|
nickname, domain, port,
|
||||||
announceNickname, announceDomain, announcePort, None,
|
announceNickname, announceDomain, announcePort, None,
|
||||||
http_prefix, True, clientToServer, federationList,
|
http_prefix, True, client_to_server, federationList,
|
||||||
sendThreads, postLog, cachedWebfingers, personCache,
|
sendThreads, postLog, cachedWebfingers, personCache,
|
||||||
debug, project_version, None, groupAccount,
|
debug, project_version, None, groupAccount,
|
||||||
signingPrivateKeyPem, 639633)
|
signingPrivateKeyPem, 639633)
|
||||||
|
@ -188,7 +188,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, clientToServer: bool,
|
objectUrl: str, client_to_server: bool,
|
||||||
sendThreads: [], postLog: [],
|
sendThreads: [], postLog: [],
|
||||||
personCache: {}, cachedWebfingers: {},
|
personCache: {}, cachedWebfingers: {},
|
||||||
debug: bool, project_version: str,
|
debug: bool, project_version: str,
|
||||||
|
@ -202,7 +202,7 @@ def announcePublic(session, base_dir: str, federationList: [],
|
||||||
return createAnnounce(session, base_dir, federationList,
|
return createAnnounce(session, base_dir, federationList,
|
||||||
nickname, domain, port,
|
nickname, domain, port,
|
||||||
toUrl, ccUrl, http_prefix,
|
toUrl, ccUrl, http_prefix,
|
||||||
objectUrl, True, clientToServer,
|
objectUrl, True, client_to_server,
|
||||||
sendThreads, postLog,
|
sendThreads, postLog,
|
||||||
personCache, cachedWebfingers,
|
personCache, cachedWebfingers,
|
||||||
debug, project_version,
|
debug, project_version,
|
||||||
|
|
|
@ -251,7 +251,7 @@ def bookmark(recentPostsCache: {},
|
||||||
nickname: str, domain: str, port: int,
|
nickname: str, domain: str, port: int,
|
||||||
ccList: [], http_prefix: str,
|
ccList: [], http_prefix: str,
|
||||||
objectUrl: str, actorBookmarked: str,
|
objectUrl: str, actorBookmarked: str,
|
||||||
clientToServer: bool,
|
client_to_server: bool,
|
||||||
sendThreads: [], postLog: [],
|
sendThreads: [], postLog: [],
|
||||||
personCache: {}, cachedWebfingers: {},
|
personCache: {}, cachedWebfingers: {},
|
||||||
debug: bool, project_version: str) -> {}:
|
debug: bool, project_version: str) -> {}:
|
||||||
|
@ -310,7 +310,7 @@ def undoBookmark(recentPostsCache: {},
|
||||||
nickname: str, domain: str, port: int,
|
nickname: str, domain: str, port: int,
|
||||||
ccList: [], http_prefix: str,
|
ccList: [], http_prefix: str,
|
||||||
objectUrl: str, actorBookmarked: str,
|
objectUrl: str, actorBookmarked: str,
|
||||||
clientToServer: bool,
|
client_to_server: bool,
|
||||||
sendThreads: [], postLog: [],
|
sendThreads: [], postLog: [],
|
||||||
personCache: {}, cachedWebfingers: {},
|
personCache: {}, cachedWebfingers: {},
|
||||||
debug: bool, project_version: str) -> {}:
|
debug: bool, project_version: str) -> {}:
|
||||||
|
|
24
daemon.py
24
daemon.py
|
@ -16683,7 +16683,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
# submit button on newblog screen
|
# submit button on newblog screen
|
||||||
followersOnly = False
|
followersOnly = False
|
||||||
saveToFile = False
|
saveToFile = False
|
||||||
clientToServer = False
|
client_to_server = False
|
||||||
city = None
|
city = None
|
||||||
conversationId = None
|
conversationId = None
|
||||||
if fields.get('conversationId'):
|
if fields.get('conversationId'):
|
||||||
|
@ -16694,7 +16694,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.http_prefix,
|
self.server.http_prefix,
|
||||||
fields['message'],
|
fields['message'],
|
||||||
followersOnly, saveToFile,
|
followersOnly, saveToFile,
|
||||||
clientToServer, commentsEnabled,
|
client_to_server, commentsEnabled,
|
||||||
filename, attachmentMediaType,
|
filename, attachmentMediaType,
|
||||||
fields['imageDescription'],
|
fields['imageDescription'],
|
||||||
city,
|
city,
|
||||||
|
@ -16831,7 +16831,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.domain)
|
self.server.domain)
|
||||||
followersOnly = False
|
followersOnly = False
|
||||||
saveToFile = False
|
saveToFile = False
|
||||||
clientToServer = False
|
client_to_server = False
|
||||||
|
|
||||||
conversationId = None
|
conversationId = None
|
||||||
if fields.get('conversationId'):
|
if fields.get('conversationId'):
|
||||||
|
@ -16844,7 +16844,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.http_prefix,
|
self.server.http_prefix,
|
||||||
mentionsStr + fields['message'],
|
mentionsStr + fields['message'],
|
||||||
followersOnly, saveToFile,
|
followersOnly, saveToFile,
|
||||||
clientToServer, commentsEnabled,
|
client_to_server, commentsEnabled,
|
||||||
filename, attachmentMediaType,
|
filename, attachmentMediaType,
|
||||||
fields['imageDescription'],
|
fields['imageDescription'],
|
||||||
city,
|
city,
|
||||||
|
@ -16881,7 +16881,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.domain)
|
self.server.domain)
|
||||||
followersOnly = True
|
followersOnly = True
|
||||||
saveToFile = False
|
saveToFile = False
|
||||||
clientToServer = False
|
client_to_server = False
|
||||||
|
|
||||||
conversationId = None
|
conversationId = None
|
||||||
if fields.get('conversationId'):
|
if fields.get('conversationId'):
|
||||||
|
@ -16895,7 +16895,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.http_prefix,
|
self.server.http_prefix,
|
||||||
mentionsStr + fields['message'],
|
mentionsStr + fields['message'],
|
||||||
followersOnly, saveToFile,
|
followersOnly, saveToFile,
|
||||||
clientToServer,
|
client_to_server,
|
||||||
commentsEnabled,
|
commentsEnabled,
|
||||||
filename, attachmentMediaType,
|
filename, attachmentMediaType,
|
||||||
fields['imageDescription'],
|
fields['imageDescription'],
|
||||||
|
@ -16936,7 +16936,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.domain)
|
self.server.domain)
|
||||||
followersOnly = True
|
followersOnly = True
|
||||||
saveToFile = False
|
saveToFile = False
|
||||||
clientToServer = False
|
client_to_server = False
|
||||||
|
|
||||||
conversationId = None
|
conversationId = None
|
||||||
if fields.get('conversationId'):
|
if fields.get('conversationId'):
|
||||||
|
@ -16952,7 +16952,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
mentionsStr +
|
mentionsStr +
|
||||||
fields['message'],
|
fields['message'],
|
||||||
followersOnly, saveToFile,
|
followersOnly, saveToFile,
|
||||||
clientToServer,
|
client_to_server,
|
||||||
commentsEnabled,
|
commentsEnabled,
|
||||||
filename, attachmentMediaType,
|
filename, attachmentMediaType,
|
||||||
fields['imageDescription'],
|
fields['imageDescription'],
|
||||||
|
@ -16997,7 +16997,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.domain)
|
self.server.domain)
|
||||||
followersOnly = True
|
followersOnly = True
|
||||||
saveToFile = False
|
saveToFile = False
|
||||||
clientToServer = False
|
client_to_server = False
|
||||||
commentsEnabled = False
|
commentsEnabled = False
|
||||||
conversationId = None
|
conversationId = None
|
||||||
messageJson = \
|
messageJson = \
|
||||||
|
@ -17008,7 +17008,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.http_prefix,
|
self.server.http_prefix,
|
||||||
mentionsStr + fields['message'],
|
mentionsStr + fields['message'],
|
||||||
followersOnly, saveToFile,
|
followersOnly, saveToFile,
|
||||||
clientToServer, commentsEnabled,
|
client_to_server, commentsEnabled,
|
||||||
filename, attachmentMediaType,
|
filename, attachmentMediaType,
|
||||||
fields['imageDescription'],
|
fields['imageDescription'],
|
||||||
city,
|
city,
|
||||||
|
@ -18456,7 +18456,7 @@ def runDaemon(content_license_url: str,
|
||||||
max_recent_posts: int,
|
max_recent_posts: int,
|
||||||
enable_shared_inbox: bool, registration: bool,
|
enable_shared_inbox: bool, registration: bool,
|
||||||
language: str, project_version: str,
|
language: str, project_version: str,
|
||||||
instance_id: str, clientToServer: bool,
|
instance_id: str, client_to_server: bool,
|
||||||
base_dir: str, domain: str,
|
base_dir: str, domain: str,
|
||||||
onionDomain: str, i2pDomain: str,
|
onionDomain: str, i2pDomain: str,
|
||||||
yt_replace_domain: str,
|
yt_replace_domain: str,
|
||||||
|
@ -18998,7 +18998,7 @@ def runDaemon(content_license_url: str,
|
||||||
print('Starting federated shares daemon')
|
print('Starting federated shares daemon')
|
||||||
httpd.thrFederatedSharesDaemon.start()
|
httpd.thrFederatedSharesDaemon.start()
|
||||||
|
|
||||||
if clientToServer:
|
if client_to_server:
|
||||||
print('Running ActivityPub client on ' +
|
print('Running ActivityPub client on ' +
|
||||||
domain + ' port ' + str(proxyPort))
|
domain + ' port ' + str(proxyPort))
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -1292,7 +1292,7 @@ if args.message:
|
||||||
ccUrl = None
|
ccUrl = None
|
||||||
sendMessage = args.message
|
sendMessage = args.message
|
||||||
followersOnly = args.followersonly
|
followersOnly = args.followersonly
|
||||||
clientToServer = args.client
|
client_to_server = args.client
|
||||||
attachedImageDescription = args.imageDescription
|
attachedImageDescription = args.imageDescription
|
||||||
city = 'London, England'
|
city = 'London, England'
|
||||||
sendThreads = []
|
sendThreads = []
|
||||||
|
|
12
follow.py
12
follow.py
|
@ -744,7 +744,7 @@ def followedAccountAccepts(session, base_dir: str, http_prefix: str,
|
||||||
nicknameToFollow + '@' + domainToFollow +
|
nicknameToFollow + '@' + domainToFollow +
|
||||||
' port ' + str(port) + ' to ' +
|
' port ' + str(port) + ' to ' +
|
||||||
acceptHandle + ' port ' + str(fromPort))
|
acceptHandle + ' port ' + str(fromPort))
|
||||||
clientToServer = False
|
client_to_server = False
|
||||||
|
|
||||||
if removeFollowActivity:
|
if removeFollowActivity:
|
||||||
# remove the follow request json
|
# remove the follow request json
|
||||||
|
@ -768,7 +768,7 @@ def followedAccountAccepts(session, base_dir: str, http_prefix: str,
|
||||||
return sendSignedJson(acceptJson, session, base_dir,
|
return sendSignedJson(acceptJson, session, base_dir,
|
||||||
nicknameToFollow, domainToFollow, port,
|
nicknameToFollow, domainToFollow, port,
|
||||||
nickname, domain, fromPort, '',
|
nickname, domain, fromPort, '',
|
||||||
http_prefix, True, clientToServer,
|
http_prefix, True, client_to_server,
|
||||||
federationList,
|
federationList,
|
||||||
sendThreads, postLog, cachedWebfingers,
|
sendThreads, postLog, cachedWebfingers,
|
||||||
personCache, debug, project_version, None,
|
personCache, debug, project_version, None,
|
||||||
|
@ -818,7 +818,7 @@ def followedAccountRejects(session, base_dir: str, http_prefix: str,
|
||||||
nicknameToFollow + '@' + domainToFollow +
|
nicknameToFollow + '@' + domainToFollow +
|
||||||
' port ' + str(port) + ' to ' +
|
' port ' + str(port) + ' to ' +
|
||||||
nickname + '@' + domain + ' port ' + str(fromPort))
|
nickname + '@' + domain + ' port ' + str(fromPort))
|
||||||
clientToServer = False
|
client_to_server = False
|
||||||
denyHandle = getFullDomain(nickname + '@' + domain, fromPort)
|
denyHandle = getFullDomain(nickname + '@' + domain, fromPort)
|
||||||
groupAccount = False
|
groupAccount = False
|
||||||
if hasGroupType(base_dir, personUrl, personCache):
|
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,
|
return sendSignedJson(rejectJson, session, base_dir,
|
||||||
nicknameToFollow, domainToFollow, port,
|
nicknameToFollow, domainToFollow, port,
|
||||||
nickname, domain, fromPort, '',
|
nickname, domain, fromPort, '',
|
||||||
http_prefix, True, clientToServer,
|
http_prefix, True, client_to_server,
|
||||||
federationList,
|
federationList,
|
||||||
sendThreads, postLog, cachedWebfingers,
|
sendThreads, postLog, cachedWebfingers,
|
||||||
personCache, debug, project_version, None,
|
personCache, debug, project_version, None,
|
||||||
|
@ -849,7 +849,7 @@ def sendFollowRequest(session, base_dir: str,
|
||||||
followNickname: str, followDomain: str,
|
followNickname: str, followDomain: str,
|
||||||
followedActor: str,
|
followedActor: str,
|
||||||
followPort: int, followHttpPrefix: str,
|
followPort: int, followHttpPrefix: str,
|
||||||
clientToServer: bool, federationList: [],
|
client_to_server: bool, federationList: [],
|
||||||
sendThreads: [], postLog: [], cachedWebfingers: {},
|
sendThreads: [], postLog: [], cachedWebfingers: {},
|
||||||
personCache: {}, debug: bool,
|
personCache: {}, debug: bool,
|
||||||
project_version: str, signingPrivateKeyPem: str) -> {}:
|
project_version: str, signingPrivateKeyPem: str) -> {}:
|
||||||
|
@ -928,7 +928,7 @@ def sendFollowRequest(session, base_dir: str,
|
||||||
sendSignedJson(newFollowJson, session, base_dir, nickname, domain, port,
|
sendSignedJson(newFollowJson, session, base_dir, nickname, domain, port,
|
||||||
followNickname, followDomain, followPort,
|
followNickname, followDomain, followPort,
|
||||||
'https://www.w3.org/ns/activitystreams#Public',
|
'https://www.w3.org/ns/activitystreams#Public',
|
||||||
http_prefix, True, clientToServer,
|
http_prefix, True, client_to_server,
|
||||||
federationList,
|
federationList,
|
||||||
sendThreads, postLog, cachedWebfingers, personCache,
|
sendThreads, postLog, cachedWebfingers, personCache,
|
||||||
debug, project_version, None, groupAccount,
|
debug, project_version, None, groupAccount,
|
||||||
|
|
4
inbox.py
4
inbox.py
|
@ -2830,7 +2830,7 @@ def _bounceDM(senderPostId: str, session, http_prefix: str,
|
||||||
content = translate['DM bounce']
|
content = translate['DM bounce']
|
||||||
followersOnly = False
|
followersOnly = False
|
||||||
saveToFile = False
|
saveToFile = False
|
||||||
clientToServer = False
|
client_to_server = False
|
||||||
commentsEnabled = False
|
commentsEnabled = False
|
||||||
attachImageFilename = None
|
attachImageFilename = None
|
||||||
mediaType = None
|
mediaType = None
|
||||||
|
@ -2847,7 +2847,7 @@ def _bounceDM(senderPostId: str, session, http_prefix: str,
|
||||||
postJsonObject = \
|
postJsonObject = \
|
||||||
createDirectMessagePost(base_dir, nickname, domain, port,
|
createDirectMessagePost(base_dir, nickname, domain, port,
|
||||||
http_prefix, content, followersOnly,
|
http_prefix, content, followersOnly,
|
||||||
saveToFile, clientToServer,
|
saveToFile, client_to_server,
|
||||||
commentsEnabled,
|
commentsEnabled,
|
||||||
attachImageFilename, mediaType,
|
attachImageFilename, mediaType,
|
||||||
imageDescription, city,
|
imageDescription, city,
|
||||||
|
|
8
like.py
8
like.py
|
@ -73,7 +73,7 @@ def _like(recentPostsCache: {},
|
||||||
nickname: str, domain: str, port: int,
|
nickname: str, domain: str, port: int,
|
||||||
ccList: [], http_prefix: str,
|
ccList: [], http_prefix: str,
|
||||||
objectUrl: str, actorLiked: str,
|
objectUrl: str, actorLiked: str,
|
||||||
clientToServer: bool,
|
client_to_server: bool,
|
||||||
sendThreads: [], postLog: [],
|
sendThreads: [], postLog: [],
|
||||||
personCache: {}, cachedWebfingers: {},
|
personCache: {}, cachedWebfingers: {},
|
||||||
debug: bool, project_version: str,
|
debug: bool, project_version: str,
|
||||||
|
@ -135,7 +135,7 @@ def _like(recentPostsCache: {},
|
||||||
nickname, domain, port,
|
nickname, domain, port,
|
||||||
likedPostNickname, likedPostDomain, likedPostPort,
|
likedPostNickname, likedPostDomain, likedPostPort,
|
||||||
'https://www.w3.org/ns/activitystreams#Public',
|
'https://www.w3.org/ns/activitystreams#Public',
|
||||||
http_prefix, True, clientToServer, federationList,
|
http_prefix, True, client_to_server, federationList,
|
||||||
sendThreads, postLog, cachedWebfingers, personCache,
|
sendThreads, postLog, cachedWebfingers, personCache,
|
||||||
debug, project_version, None, groupAccount,
|
debug, project_version, None, groupAccount,
|
||||||
signingPrivateKeyPem, 7367374)
|
signingPrivateKeyPem, 7367374)
|
||||||
|
@ -148,7 +148,7 @@ def likePost(recentPostsCache: {},
|
||||||
nickname: str, domain: str, port: int, http_prefix: str,
|
nickname: str, domain: str, port: int, http_prefix: str,
|
||||||
likeNickname: str, likeDomain: str, likePort: int,
|
likeNickname: str, likeDomain: str, likePort: int,
|
||||||
ccList: [],
|
ccList: [],
|
||||||
likeStatusNumber: int, clientToServer: bool,
|
likeStatusNumber: int, client_to_server: bool,
|
||||||
sendThreads: [], postLog: [],
|
sendThreads: [], postLog: [],
|
||||||
personCache: {}, cachedWebfingers: {},
|
personCache: {}, cachedWebfingers: {},
|
||||||
debug: bool, project_version: str,
|
debug: bool, project_version: str,
|
||||||
|
@ -162,7 +162,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, clientToServer,
|
ccList, http_prefix, objectUrl, actorLiked, client_to_server,
|
||||||
sendThreads, postLog, personCache, cachedWebfingers,
|
sendThreads, postLog, personCache, cachedWebfingers,
|
||||||
debug, project_version, signingPrivateKeyPem)
|
debug, project_version, signingPrivateKeyPem)
|
||||||
|
|
||||||
|
|
60
posts.py
60
posts.py
|
@ -1363,7 +1363,7 @@ def _createPostBase(base_dir: str,
|
||||||
nickname: str, domain: str, port: int,
|
nickname: str, domain: str, port: int,
|
||||||
toUrl: str, ccUrl: str, http_prefix: str, content: str,
|
toUrl: str, ccUrl: str, http_prefix: str, content: str,
|
||||||
followersOnly: bool, saveToFile: bool,
|
followersOnly: bool, saveToFile: bool,
|
||||||
clientToServer: bool, commentsEnabled: bool,
|
client_to_server: bool, commentsEnabled: bool,
|
||||||
attachImageFilename: str,
|
attachImageFilename: str,
|
||||||
mediaType: str, imageDescription: str, city: str,
|
mediaType: str, imageDescription: str, city: str,
|
||||||
isModerationReport: bool,
|
isModerationReport: bool,
|
||||||
|
@ -1506,7 +1506,7 @@ def _createPostBase(base_dir: str,
|
||||||
if isArticle:
|
if isArticle:
|
||||||
postObjectType = 'Article'
|
postObjectType = 'Article'
|
||||||
|
|
||||||
if not clientToServer:
|
if not client_to_server:
|
||||||
newPost = \
|
newPost = \
|
||||||
_createPostS2S(base_dir, nickname, domain, port,
|
_createPostS2S(base_dir, nickname, domain, port,
|
||||||
http_prefix, content, statusNumber,
|
http_prefix, content, statusNumber,
|
||||||
|
@ -1757,7 +1757,7 @@ def regenerateIndexForBox(base_dir: str,
|
||||||
def createPublicPost(base_dir: str,
|
def createPublicPost(base_dir: str,
|
||||||
nickname: str, domain: str, port: int, http_prefix: str,
|
nickname: str, domain: str, port: int, http_prefix: str,
|
||||||
content: str, followersOnly: bool, saveToFile: bool,
|
content: str, followersOnly: bool, saveToFile: bool,
|
||||||
clientToServer: bool, commentsEnabled: bool,
|
client_to_server: bool, commentsEnabled: bool,
|
||||||
attachImageFilename: str, mediaType: str,
|
attachImageFilename: str, mediaType: str,
|
||||||
imageDescription: str, city: str,
|
imageDescription: str, city: str,
|
||||||
inReplyTo: str,
|
inReplyTo: str,
|
||||||
|
@ -1788,7 +1788,7 @@ def createPublicPost(base_dir: str,
|
||||||
'https://www.w3.org/ns/activitystreams#Public',
|
'https://www.w3.org/ns/activitystreams#Public',
|
||||||
localActor + '/followers',
|
localActor + '/followers',
|
||||||
http_prefix, content, followersOnly, saveToFile,
|
http_prefix, content, followersOnly, saveToFile,
|
||||||
clientToServer, commentsEnabled,
|
client_to_server, commentsEnabled,
|
||||||
attachImageFilename, mediaType,
|
attachImageFilename, mediaType,
|
||||||
imageDescription, city,
|
imageDescription, city,
|
||||||
isModerationReport, isArticle,
|
isModerationReport, isArticle,
|
||||||
|
@ -1836,7 +1836,7 @@ def _appendCitationsToBlogPost(base_dir: str,
|
||||||
def createBlogPost(base_dir: str,
|
def createBlogPost(base_dir: str,
|
||||||
nickname: str, domain: str, port: int, http_prefix: str,
|
nickname: str, domain: str, port: int, http_prefix: str,
|
||||||
content: str, followersOnly: bool, saveToFile: bool,
|
content: str, followersOnly: bool, saveToFile: bool,
|
||||||
clientToServer: bool, commentsEnabled: bool,
|
client_to_server: bool, commentsEnabled: bool,
|
||||||
attachImageFilename: str, mediaType: str,
|
attachImageFilename: str, mediaType: str,
|
||||||
imageDescription: str, city: str,
|
imageDescription: str, city: str,
|
||||||
inReplyTo: str, inReplyToAtomUri: str,
|
inReplyTo: str, inReplyToAtomUri: str,
|
||||||
|
@ -1849,7 +1849,7 @@ def createBlogPost(base_dir: str,
|
||||||
createPublicPost(base_dir,
|
createPublicPost(base_dir,
|
||||||
nickname, domain, port, http_prefix,
|
nickname, domain, port, http_prefix,
|
||||||
content, followersOnly, saveToFile,
|
content, followersOnly, saveToFile,
|
||||||
clientToServer, commentsEnabled,
|
client_to_server, commentsEnabled,
|
||||||
attachImageFilename, mediaType,
|
attachImageFilename, mediaType,
|
||||||
imageDescription, city,
|
imageDescription, city,
|
||||||
inReplyTo, inReplyToAtomUri, subject,
|
inReplyTo, inReplyToAtomUri, subject,
|
||||||
|
@ -1872,7 +1872,7 @@ def createNewsPost(base_dir: str,
|
||||||
subject: str, systemLanguage: str,
|
subject: str, systemLanguage: str,
|
||||||
conversationId: str, low_bandwidth: bool,
|
conversationId: str, low_bandwidth: bool,
|
||||||
content_license_url: str) -> {}:
|
content_license_url: str) -> {}:
|
||||||
clientToServer = False
|
client_to_server = False
|
||||||
inReplyTo = None
|
inReplyTo = None
|
||||||
inReplyToAtomUri = None
|
inReplyToAtomUri = None
|
||||||
schedulePost = False
|
schedulePost = False
|
||||||
|
@ -1883,7 +1883,7 @@ def createNewsPost(base_dir: str,
|
||||||
createPublicPost(base_dir,
|
createPublicPost(base_dir,
|
||||||
'news', domain, port, http_prefix,
|
'news', domain, port, http_prefix,
|
||||||
content, followersOnly, saveToFile,
|
content, followersOnly, saveToFile,
|
||||||
clientToServer, False,
|
client_to_server, False,
|
||||||
attachImageFilename, mediaType,
|
attachImageFilename, mediaType,
|
||||||
imageDescription, city,
|
imageDescription, city,
|
||||||
inReplyTo, inReplyToAtomUri, subject,
|
inReplyTo, inReplyToAtomUri, subject,
|
||||||
|
@ -1899,7 +1899,7 @@ def createQuestionPost(base_dir: str,
|
||||||
nickname: str, domain: str, port: int, http_prefix: str,
|
nickname: str, domain: str, port: int, http_prefix: str,
|
||||||
content: str, qOptions: [],
|
content: str, qOptions: [],
|
||||||
followersOnly: bool, saveToFile: bool,
|
followersOnly: bool, saveToFile: bool,
|
||||||
clientToServer: bool, commentsEnabled: bool,
|
client_to_server: bool, commentsEnabled: bool,
|
||||||
attachImageFilename: str, mediaType: str,
|
attachImageFilename: str, mediaType: str,
|
||||||
imageDescription: str, city: str,
|
imageDescription: str, city: str,
|
||||||
subject: str, durationDays: int,
|
subject: str, durationDays: int,
|
||||||
|
@ -1914,7 +1914,7 @@ def createQuestionPost(base_dir: str,
|
||||||
'https://www.w3.org/ns/activitystreams#Public',
|
'https://www.w3.org/ns/activitystreams#Public',
|
||||||
localActor + '/followers',
|
localActor + '/followers',
|
||||||
http_prefix, content, followersOnly, saveToFile,
|
http_prefix, content, followersOnly, saveToFile,
|
||||||
clientToServer, commentsEnabled,
|
client_to_server, commentsEnabled,
|
||||||
attachImageFilename, mediaType,
|
attachImageFilename, mediaType,
|
||||||
imageDescription, city,
|
imageDescription, city,
|
||||||
False, False, None, None, subject,
|
False, False, None, None, subject,
|
||||||
|
@ -1946,7 +1946,7 @@ def createQuestionPost(base_dir: str,
|
||||||
def createUnlistedPost(base_dir: str,
|
def createUnlistedPost(base_dir: str,
|
||||||
nickname: str, domain: str, port: int, http_prefix: str,
|
nickname: str, domain: str, port: int, http_prefix: str,
|
||||||
content: str, followersOnly: bool, saveToFile: bool,
|
content: str, followersOnly: bool, saveToFile: bool,
|
||||||
clientToServer: bool, commentsEnabled: bool,
|
client_to_server: bool, commentsEnabled: bool,
|
||||||
attachImageFilename: str, mediaType: str,
|
attachImageFilename: str, mediaType: str,
|
||||||
imageDescription: str, city: str,
|
imageDescription: str, city: str,
|
||||||
inReplyTo: str, inReplyToAtomUri: str,
|
inReplyTo: str, inReplyToAtomUri: str,
|
||||||
|
@ -1963,7 +1963,7 @@ def createUnlistedPost(base_dir: str,
|
||||||
localActor + '/followers',
|
localActor + '/followers',
|
||||||
'https://www.w3.org/ns/activitystreams#Public',
|
'https://www.w3.org/ns/activitystreams#Public',
|
||||||
http_prefix, content, followersOnly, saveToFile,
|
http_prefix, content, followersOnly, saveToFile,
|
||||||
clientToServer, commentsEnabled,
|
client_to_server, commentsEnabled,
|
||||||
attachImageFilename, mediaType,
|
attachImageFilename, mediaType,
|
||||||
imageDescription, city,
|
imageDescription, city,
|
||||||
False, False,
|
False, False,
|
||||||
|
@ -1980,7 +1980,7 @@ def createFollowersOnlyPost(base_dir: str,
|
||||||
http_prefix: str,
|
http_prefix: str,
|
||||||
content: str, followersOnly: bool,
|
content: str, followersOnly: bool,
|
||||||
saveToFile: bool,
|
saveToFile: bool,
|
||||||
clientToServer: bool, commentsEnabled: bool,
|
client_to_server: bool, commentsEnabled: bool,
|
||||||
attachImageFilename: str, mediaType: str,
|
attachImageFilename: str, mediaType: str,
|
||||||
imageDescription: str, city: str,
|
imageDescription: str, city: str,
|
||||||
inReplyTo: str,
|
inReplyTo: str,
|
||||||
|
@ -1998,7 +1998,7 @@ def createFollowersOnlyPost(base_dir: str,
|
||||||
localActor + '/followers',
|
localActor + '/followers',
|
||||||
None,
|
None,
|
||||||
http_prefix, content, followersOnly, saveToFile,
|
http_prefix, content, followersOnly, saveToFile,
|
||||||
clientToServer, commentsEnabled,
|
client_to_server, commentsEnabled,
|
||||||
attachImageFilename, mediaType,
|
attachImageFilename, mediaType,
|
||||||
imageDescription, city,
|
imageDescription, city,
|
||||||
False, False,
|
False, False,
|
||||||
|
@ -2049,7 +2049,7 @@ def createDirectMessagePost(base_dir: str,
|
||||||
nickname: str, domain: str, port: int,
|
nickname: str, domain: str, port: int,
|
||||||
http_prefix: str,
|
http_prefix: str,
|
||||||
content: str, followersOnly: bool,
|
content: str, followersOnly: bool,
|
||||||
saveToFile: bool, clientToServer: bool,
|
saveToFile: bool, client_to_server: bool,
|
||||||
commentsEnabled: bool,
|
commentsEnabled: bool,
|
||||||
attachImageFilename: str, mediaType: str,
|
attachImageFilename: str, mediaType: str,
|
||||||
imageDescription: str, city: str,
|
imageDescription: str, city: str,
|
||||||
|
@ -2076,7 +2076,7 @@ def createDirectMessagePost(base_dir: str,
|
||||||
_createPostBase(base_dir, nickname, domain, port,
|
_createPostBase(base_dir, nickname, domain, port,
|
||||||
postTo, postCc,
|
postTo, postCc,
|
||||||
http_prefix, content, followersOnly, saveToFile,
|
http_prefix, content, followersOnly, saveToFile,
|
||||||
clientToServer, commentsEnabled,
|
client_to_server, commentsEnabled,
|
||||||
attachImageFilename, mediaType,
|
attachImageFilename, mediaType,
|
||||||
imageDescription, city,
|
imageDescription, city,
|
||||||
False, False,
|
False, False,
|
||||||
|
@ -2101,7 +2101,7 @@ def createDirectMessagePost(base_dir: str,
|
||||||
def createReportPost(base_dir: str,
|
def createReportPost(base_dir: str,
|
||||||
nickname: str, domain: str, port: int, http_prefix: str,
|
nickname: str, domain: str, port: int, http_prefix: str,
|
||||||
content: str, followersOnly: bool, saveToFile: bool,
|
content: str, followersOnly: bool, saveToFile: bool,
|
||||||
clientToServer: bool, commentsEnabled: bool,
|
client_to_server: bool, commentsEnabled: bool,
|
||||||
attachImageFilename: str, mediaType: str,
|
attachImageFilename: str, mediaType: str,
|
||||||
imageDescription: str, city: str,
|
imageDescription: str, city: str,
|
||||||
debug: bool, subject: str, systemLanguage: str,
|
debug: bool, subject: str, systemLanguage: str,
|
||||||
|
@ -2173,7 +2173,7 @@ def createReportPost(base_dir: str,
|
||||||
_createPostBase(base_dir, nickname, domain, port,
|
_createPostBase(base_dir, nickname, domain, port,
|
||||||
toUrl, postCc,
|
toUrl, postCc,
|
||||||
http_prefix, content, followersOnly, saveToFile,
|
http_prefix, content, followersOnly, saveToFile,
|
||||||
clientToServer, commentsEnabled,
|
client_to_server, commentsEnabled,
|
||||||
attachImageFilename, mediaType,
|
attachImageFilename, mediaType,
|
||||||
imageDescription, city,
|
imageDescription, city,
|
||||||
True, False, None, None, subject,
|
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,
|
session, base_dir: str, nickname: str, domain: str, port: int,
|
||||||
toNickname: str, toDomain: str, toPort: int, cc: str,
|
toNickname: str, toDomain: str, toPort: int, cc: str,
|
||||||
http_prefix: str, content: str, followersOnly: bool,
|
http_prefix: str, content: str, followersOnly: bool,
|
||||||
saveToFile: bool, clientToServer: bool,
|
saveToFile: bool, client_to_server: bool,
|
||||||
commentsEnabled: bool,
|
commentsEnabled: bool,
|
||||||
attachImageFilename: str, mediaType: str,
|
attachImageFilename: str, mediaType: str,
|
||||||
imageDescription: str, city: str,
|
imageDescription: str, city: str,
|
||||||
|
@ -2304,7 +2304,7 @@ def sendPost(signingPrivateKeyPem: str, project_version: str,
|
||||||
str(wfRequest))
|
str(wfRequest))
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
if not clientToServer:
|
if not client_to_server:
|
||||||
postToBox = 'inbox'
|
postToBox = 'inbox'
|
||||||
else:
|
else:
|
||||||
postToBox = 'outbox'
|
postToBox = 'outbox'
|
||||||
|
@ -2333,7 +2333,7 @@ def sendPost(signingPrivateKeyPem: str, project_version: str,
|
||||||
postJsonObject = \
|
postJsonObject = \
|
||||||
_createPostBase(base_dir, nickname, domain, port,
|
_createPostBase(base_dir, nickname, domain, port,
|
||||||
toPersonId, cc, http_prefix, content,
|
toPersonId, cc, http_prefix, content,
|
||||||
followersOnly, saveToFile, clientToServer,
|
followersOnly, saveToFile, client_to_server,
|
||||||
commentsEnabled,
|
commentsEnabled,
|
||||||
attachImageFilename, mediaType,
|
attachImageFilename, mediaType,
|
||||||
imageDescription, city,
|
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
|
# Get the json for the c2s post, not saving anything to file
|
||||||
# Note that base_dir is set to None
|
# Note that base_dir is set to None
|
||||||
saveToFile = False
|
saveToFile = False
|
||||||
clientToServer = True
|
client_to_server = True
|
||||||
if toDomain.lower().endswith('public'):
|
if toDomain.lower().endswith('public'):
|
||||||
toPersonId = 'https://www.w3.org/ns/activitystreams#Public'
|
toPersonId = 'https://www.w3.org/ns/activitystreams#Public'
|
||||||
cc = localActorUrl(http_prefix, fromNickname, fromDomainFull) + \
|
cc = localActorUrl(http_prefix, fromNickname, fromDomainFull) + \
|
||||||
|
@ -2502,7 +2502,7 @@ def sendPostViaServer(signingPrivateKeyPem: str, project_version: str,
|
||||||
_createPostBase(base_dir,
|
_createPostBase(base_dir,
|
||||||
fromNickname, fromDomain, fromPort,
|
fromNickname, fromDomain, fromPort,
|
||||||
toPersonId, cc, http_prefix, content,
|
toPersonId, cc, http_prefix, content,
|
||||||
followersOnly, saveToFile, clientToServer,
|
followersOnly, saveToFile, client_to_server,
|
||||||
commentsEnabled,
|
commentsEnabled,
|
||||||
attachImageFilename, mediaType,
|
attachImageFilename, mediaType,
|
||||||
imageDescription, city,
|
imageDescription, city,
|
||||||
|
@ -2610,7 +2610,7 @@ def _addFollowersToPublicPost(postJsonObject: {}) -> None:
|
||||||
def sendSignedJson(postJsonObject: {}, session, base_dir: str,
|
def sendSignedJson(postJsonObject: {}, session, base_dir: str,
|
||||||
nickname: str, domain: str, port: int,
|
nickname: str, domain: str, port: int,
|
||||||
toNickname: str, toDomain: str, toPort: int, cc: str,
|
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: [],
|
federationList: [],
|
||||||
sendThreads: [], postLog: [], cachedWebfingers: {},
|
sendThreads: [], postLog: [], cachedWebfingers: {},
|
||||||
personCache: {}, debug: bool, project_version: str,
|
personCache: {}, debug: bool, project_version: str,
|
||||||
|
@ -2668,7 +2668,7 @@ def sendSignedJson(postJsonObject: {}, session, base_dir: str,
|
||||||
print('DEBUG: webfinger for ' + handle +
|
print('DEBUG: webfinger for ' + handle +
|
||||||
' failed with errors ' + str(wfRequest['errors']))
|
' failed with errors ' + str(wfRequest['errors']))
|
||||||
|
|
||||||
if not clientToServer:
|
if not client_to_server:
|
||||||
postToBox = 'inbox'
|
postToBox = 'inbox'
|
||||||
else:
|
else:
|
||||||
postToBox = 'outbox'
|
postToBox = 'outbox'
|
||||||
|
@ -2944,7 +2944,7 @@ def _sendToNamedAddresses(session, base_dir: str,
|
||||||
print('DEBUG: Sending individually addressed posts: ' +
|
print('DEBUG: Sending individually addressed posts: ' +
|
||||||
str(recipients))
|
str(recipients))
|
||||||
# this is after the message has arrived at the server
|
# this is after the message has arrived at the server
|
||||||
clientToServer = False
|
client_to_server = False
|
||||||
for address in recipients:
|
for address in recipients:
|
||||||
toNickname = getNicknameFromActor(address)
|
toNickname = getNicknameFromActor(address)
|
||||||
if not toNickname:
|
if not toNickname:
|
||||||
|
@ -2999,7 +2999,7 @@ def _sendToNamedAddresses(session, base_dir: str,
|
||||||
sendSignedJson(postJsonObject, session, base_dir,
|
sendSignedJson(postJsonObject, session, base_dir,
|
||||||
nickname, fromDomain, port,
|
nickname, fromDomain, port,
|
||||||
toNickname, toDomain, toPort,
|
toNickname, toDomain, toPort,
|
||||||
cc, fromHttpPrefix, True, clientToServer,
|
cc, fromHttpPrefix, True, client_to_server,
|
||||||
federationList,
|
federationList,
|
||||||
sendThreads, postLog, cachedWebfingers,
|
sendThreads, postLog, cachedWebfingers,
|
||||||
personCache, debug, project_version,
|
personCache, debug, project_version,
|
||||||
|
@ -3117,7 +3117,7 @@ def sendToFollowers(session, base_dir: str,
|
||||||
# print(str(grouped))
|
# print(str(grouped))
|
||||||
|
|
||||||
# this is after the message has arrived at the server
|
# this is after the message has arrived at the server
|
||||||
clientToServer = False
|
client_to_server = False
|
||||||
|
|
||||||
# for each instance
|
# for each instance
|
||||||
sendingStartTime = datetime.datetime.utcnow()
|
sendingStartTime = datetime.datetime.utcnow()
|
||||||
|
@ -3209,7 +3209,7 @@ def sendToFollowers(session, base_dir: str,
|
||||||
sendSignedJson(postJsonObject, session, base_dir,
|
sendSignedJson(postJsonObject, session, base_dir,
|
||||||
nickname, fromDomain, port,
|
nickname, fromDomain, port,
|
||||||
toNickname, toDomain, toPort,
|
toNickname, toDomain, toPort,
|
||||||
cc, fromHttpPrefix, True, clientToServer,
|
cc, fromHttpPrefix, True, client_to_server,
|
||||||
federationList,
|
federationList,
|
||||||
sendThreads, postLog, cachedWebfingers,
|
sendThreads, postLog, cachedWebfingers,
|
||||||
personCache, debug, project_version,
|
personCache, debug, project_version,
|
||||||
|
@ -3238,7 +3238,7 @@ def sendToFollowers(session, base_dir: str,
|
||||||
sendSignedJson(postJsonObject, session, base_dir,
|
sendSignedJson(postJsonObject, session, base_dir,
|
||||||
nickname, fromDomain, port,
|
nickname, fromDomain, port,
|
||||||
toNickname, toDomain, toPort,
|
toNickname, toDomain, toPort,
|
||||||
cc, fromHttpPrefix, True, clientToServer,
|
cc, fromHttpPrefix, True, client_to_server,
|
||||||
federationList,
|
federationList,
|
||||||
sendThreads, postLog, cachedWebfingers,
|
sendThreads, postLog, cachedWebfingers,
|
||||||
personCache, debug, project_version,
|
personCache, debug, project_version,
|
||||||
|
|
|
@ -66,7 +66,7 @@ def _reaction(recentPostsCache: {},
|
||||||
ccList: [], http_prefix: str,
|
ccList: [], http_prefix: str,
|
||||||
objectUrl: str, emojiContent: str,
|
objectUrl: str, emojiContent: str,
|
||||||
actorReaction: str,
|
actorReaction: str,
|
||||||
clientToServer: bool,
|
client_to_server: bool,
|
||||||
sendThreads: [], postLog: [],
|
sendThreads: [], postLog: [],
|
||||||
personCache: {}, cachedWebfingers: {},
|
personCache: {}, cachedWebfingers: {},
|
||||||
debug: bool, project_version: str,
|
debug: bool, project_version: str,
|
||||||
|
@ -137,7 +137,7 @@ def _reaction(recentPostsCache: {},
|
||||||
reactionPostNickname,
|
reactionPostNickname,
|
||||||
reactionPostDomain, reactionPostPort,
|
reactionPostDomain, reactionPostPort,
|
||||||
'https://www.w3.org/ns/activitystreams#Public',
|
'https://www.w3.org/ns/activitystreams#Public',
|
||||||
http_prefix, True, clientToServer, federationList,
|
http_prefix, True, client_to_server, federationList,
|
||||||
sendThreads, postLog, cachedWebfingers, personCache,
|
sendThreads, postLog, cachedWebfingers, personCache,
|
||||||
debug, project_version, None, groupAccount,
|
debug, project_version, None, groupAccount,
|
||||||
signingPrivateKeyPem, 7165392)
|
signingPrivateKeyPem, 7165392)
|
||||||
|
@ -151,7 +151,7 @@ def reactionPost(recentPostsCache: {},
|
||||||
reactionNickname: str, reactionDomain: str, reactionPort: int,
|
reactionNickname: str, reactionDomain: str, reactionPort: int,
|
||||||
ccList: [],
|
ccList: [],
|
||||||
reactionStatusNumber: int, emojiContent: str,
|
reactionStatusNumber: int, emojiContent: str,
|
||||||
clientToServer: bool,
|
client_to_server: bool,
|
||||||
sendThreads: [], postLog: [],
|
sendThreads: [], postLog: [],
|
||||||
personCache: {}, cachedWebfingers: {},
|
personCache: {}, cachedWebfingers: {},
|
||||||
debug: bool, project_version: str,
|
debug: bool, project_version: str,
|
||||||
|
@ -168,7 +168,7 @@ def reactionPost(recentPostsCache: {},
|
||||||
session, base_dir, federationList,
|
session, base_dir, federationList,
|
||||||
nickname, domain, port,
|
nickname, domain, port,
|
||||||
ccList, http_prefix, objectUrl, emojiContent,
|
ccList, http_prefix, objectUrl, emojiContent,
|
||||||
actorReaction, clientToServer,
|
actorReaction, client_to_server,
|
||||||
sendThreads, postLog, personCache, cachedWebfingers,
|
sendThreads, postLog, personCache, cachedWebfingers,
|
||||||
debug, project_version, signingPrivateKeyPem)
|
debug, project_version, signingPrivateKeyPem)
|
||||||
|
|
||||||
|
|
58
tests.py
58
tests.py
|
@ -713,7 +713,7 @@ def createServerAlice(path: str, domain: str, port: int,
|
||||||
if hasPosts:
|
if hasPosts:
|
||||||
testFollowersOnly = False
|
testFollowersOnly = False
|
||||||
testSaveToFile = True
|
testSaveToFile = True
|
||||||
clientToServer = False
|
client_to_server = False
|
||||||
testCommentsEnabled = True
|
testCommentsEnabled = True
|
||||||
testAttachImageFilename = None
|
testAttachImageFilename = None
|
||||||
testMediaType = None
|
testMediaType = None
|
||||||
|
@ -733,7 +733,7 @@ def createServerAlice(path: str, domain: str, port: int,
|
||||||
"No wise fish would go anywhere without a porpoise",
|
"No wise fish would go anywhere without a porpoise",
|
||||||
testFollowersOnly,
|
testFollowersOnly,
|
||||||
testSaveToFile,
|
testSaveToFile,
|
||||||
clientToServer,
|
client_to_server,
|
||||||
testCommentsEnabled,
|
testCommentsEnabled,
|
||||||
testAttachImageFilename,
|
testAttachImageFilename,
|
||||||
testMediaType,
|
testMediaType,
|
||||||
|
@ -747,7 +747,7 @@ def createServerAlice(path: str, domain: str, port: int,
|
||||||
"Curiouser and curiouser!",
|
"Curiouser and curiouser!",
|
||||||
testFollowersOnly,
|
testFollowersOnly,
|
||||||
testSaveToFile,
|
testSaveToFile,
|
||||||
clientToServer,
|
client_to_server,
|
||||||
testCommentsEnabled,
|
testCommentsEnabled,
|
||||||
testAttachImageFilename,
|
testAttachImageFilename,
|
||||||
testMediaType,
|
testMediaType,
|
||||||
|
@ -762,7 +762,7 @@ def createServerAlice(path: str, domain: str, port: int,
|
||||||
"of dreams, that is where you and I shall meet",
|
"of dreams, that is where you and I shall meet",
|
||||||
testFollowersOnly,
|
testFollowersOnly,
|
||||||
testSaveToFile,
|
testSaveToFile,
|
||||||
clientToServer,
|
client_to_server,
|
||||||
testCommentsEnabled,
|
testCommentsEnabled,
|
||||||
testAttachImageFilename,
|
testAttachImageFilename,
|
||||||
testMediaType,
|
testMediaType,
|
||||||
|
@ -836,7 +836,7 @@ def createServerBob(path: str, domain: str, port: int,
|
||||||
nickname = 'bob'
|
nickname = 'bob'
|
||||||
http_prefix = 'http'
|
http_prefix = 'http'
|
||||||
proxyType = None
|
proxyType = None
|
||||||
clientToServer = False
|
client_to_server = False
|
||||||
password = 'bobpass'
|
password = 'bobpass'
|
||||||
maxReplies = 64
|
maxReplies = 64
|
||||||
domainMaxPostsPerDay = 1000
|
domainMaxPostsPerDay = 1000
|
||||||
|
@ -875,7 +875,7 @@ def createServerBob(path: str, domain: str, port: int,
|
||||||
"It's your life, live it your way.",
|
"It's your life, live it your way.",
|
||||||
testFollowersOnly,
|
testFollowersOnly,
|
||||||
testSaveToFile,
|
testSaveToFile,
|
||||||
clientToServer,
|
client_to_server,
|
||||||
testCommentsEnabled,
|
testCommentsEnabled,
|
||||||
testAttachImageFilename,
|
testAttachImageFilename,
|
||||||
testMediaType,
|
testMediaType,
|
||||||
|
@ -890,7 +890,7 @@ def createServerBob(path: str, domain: str, port: int,
|
||||||
"I am very simple",
|
"I am very simple",
|
||||||
testFollowersOnly,
|
testFollowersOnly,
|
||||||
testSaveToFile,
|
testSaveToFile,
|
||||||
clientToServer,
|
client_to_server,
|
||||||
testCommentsEnabled,
|
testCommentsEnabled,
|
||||||
testAttachImageFilename,
|
testAttachImageFilename,
|
||||||
testMediaType,
|
testMediaType,
|
||||||
|
@ -904,7 +904,7 @@ def createServerBob(path: str, domain: str, port: int,
|
||||||
"Quantum physics is a bit of a passion of mine",
|
"Quantum physics is a bit of a passion of mine",
|
||||||
testFollowersOnly,
|
testFollowersOnly,
|
||||||
testSaveToFile,
|
testSaveToFile,
|
||||||
clientToServer,
|
client_to_server,
|
||||||
testCommentsEnabled,
|
testCommentsEnabled,
|
||||||
testAttachImageFilename,
|
testAttachImageFilename,
|
||||||
testMediaType,
|
testMediaType,
|
||||||
|
@ -1186,7 +1186,7 @@ def testPostMessageBetweenServers(base_dir: str) -> None:
|
||||||
alicePostLog = []
|
alicePostLog = []
|
||||||
followersOnly = False
|
followersOnly = False
|
||||||
saveToFile = True
|
saveToFile = True
|
||||||
clientToServer = False
|
client_to_server = False
|
||||||
ccUrl = None
|
ccUrl = None
|
||||||
alicePersonCache = {}
|
alicePersonCache = {}
|
||||||
aliceCachedWebfingers = {}
|
aliceCachedWebfingers = {}
|
||||||
|
@ -1214,7 +1214,7 @@ def testPostMessageBetweenServers(base_dir: str) -> None:
|
||||||
'Why is a mouse when it spins? ' +
|
'Why is a mouse when it spins? ' +
|
||||||
'यह एक परीक्षण है #sillyquestion',
|
'यह एक परीक्षण है #sillyquestion',
|
||||||
followersOnly,
|
followersOnly,
|
||||||
saveToFile, clientToServer, True,
|
saveToFile, client_to_server, True,
|
||||||
attachedImageFilename, mediaType,
|
attachedImageFilename, mediaType,
|
||||||
attachedImageDescription, city, federationList,
|
attachedImageDescription, city, federationList,
|
||||||
aliceSendThreads, alicePostLog, aliceCachedWebfingers,
|
aliceSendThreads, alicePostLog, aliceCachedWebfingers,
|
||||||
|
@ -1518,7 +1518,7 @@ def testFollowBetweenServers(base_dir: str) -> None:
|
||||||
alicePostLog = []
|
alicePostLog = []
|
||||||
followersOnly = False
|
followersOnly = False
|
||||||
saveToFile = True
|
saveToFile = True
|
||||||
clientToServer = False
|
client_to_server = False
|
||||||
ccUrl = None
|
ccUrl = None
|
||||||
alicePersonCache = {}
|
alicePersonCache = {}
|
||||||
aliceCachedWebfingers = {}
|
aliceCachedWebfingers = {}
|
||||||
|
@ -1530,7 +1530,7 @@ def testFollowBetweenServers(base_dir: str) -> None:
|
||||||
'alice', aliceDomain, alicePort, http_prefix,
|
'alice', aliceDomain, alicePort, http_prefix,
|
||||||
'bob', bobDomain, bobActor,
|
'bob', bobDomain, bobActor,
|
||||||
bobPort, http_prefix,
|
bobPort, http_prefix,
|
||||||
clientToServer, federationList,
|
client_to_server, federationList,
|
||||||
aliceSendThreads, alicePostLog,
|
aliceSendThreads, alicePostLog,
|
||||||
aliceCachedWebfingers, alicePersonCache,
|
aliceCachedWebfingers, alicePersonCache,
|
||||||
True, __version__, signingPrivateKeyPem)
|
True, __version__, signingPrivateKeyPem)
|
||||||
|
@ -1576,7 +1576,7 @@ def testFollowBetweenServers(base_dir: str) -> None:
|
||||||
sessionAlice, aliceDir, 'alice', aliceDomain, alicePort,
|
sessionAlice, aliceDir, 'alice', aliceDomain, alicePort,
|
||||||
'bob', bobDomain, bobPort, ccUrl,
|
'bob', bobDomain, bobPort, ccUrl,
|
||||||
http_prefix, 'Alice message', followersOnly, saveToFile,
|
http_prefix, 'Alice message', followersOnly, saveToFile,
|
||||||
clientToServer, True,
|
client_to_server, True,
|
||||||
None, None, None, city, federationList,
|
None, None, None, city, federationList,
|
||||||
aliceSendThreads, alicePostLog, aliceCachedWebfingers,
|
aliceSendThreads, alicePostLog, aliceCachedWebfingers,
|
||||||
alicePersonCache, isArticle, systemLanguage,
|
alicePersonCache, isArticle, systemLanguage,
|
||||||
|
@ -1736,7 +1736,7 @@ def testSharedItemsFederation(base_dir: str) -> None:
|
||||||
alicePostLog = []
|
alicePostLog = []
|
||||||
followersOnly = False
|
followersOnly = False
|
||||||
saveToFile = True
|
saveToFile = True
|
||||||
clientToServer = False
|
client_to_server = False
|
||||||
ccUrl = None
|
ccUrl = None
|
||||||
alicePersonCache = {}
|
alicePersonCache = {}
|
||||||
aliceCachedWebfingers = {}
|
aliceCachedWebfingers = {}
|
||||||
|
@ -1747,7 +1747,7 @@ def testSharedItemsFederation(base_dir: str) -> None:
|
||||||
'alice', aliceDomain, alicePort, http_prefix,
|
'alice', aliceDomain, alicePort, http_prefix,
|
||||||
'bob', bobDomain, bobActor,
|
'bob', bobDomain, bobActor,
|
||||||
bobPort, http_prefix,
|
bobPort, http_prefix,
|
||||||
clientToServer, federationList,
|
client_to_server, federationList,
|
||||||
aliceSendThreads, alicePostLog,
|
aliceSendThreads, alicePostLog,
|
||||||
aliceCachedWebfingers, alicePersonCache,
|
aliceCachedWebfingers, alicePersonCache,
|
||||||
True, __version__, signingPrivateKeyPem)
|
True, __version__, signingPrivateKeyPem)
|
||||||
|
@ -1927,7 +1927,7 @@ def testSharedItemsFederation(base_dir: str) -> None:
|
||||||
sessionAlice, aliceDir, 'alice', aliceDomain, alicePort,
|
sessionAlice, aliceDir, 'alice', aliceDomain, alicePort,
|
||||||
'bob', bobDomain, bobPort, ccUrl,
|
'bob', bobDomain, bobPort, ccUrl,
|
||||||
http_prefix, 'Alice message', followersOnly, saveToFile,
|
http_prefix, 'Alice message', followersOnly, saveToFile,
|
||||||
clientToServer, True,
|
client_to_server, True,
|
||||||
None, None, None, city, federationList,
|
None, None, None, city, federationList,
|
||||||
aliceSendThreads, alicePostLog, aliceCachedWebfingers,
|
aliceSendThreads, alicePostLog, aliceCachedWebfingers,
|
||||||
alicePersonCache, isArticle, systemLanguage,
|
alicePersonCache, isArticle, systemLanguage,
|
||||||
|
@ -2172,7 +2172,7 @@ def testGroupFollow(base_dir: str) -> None:
|
||||||
alicePostLog = []
|
alicePostLog = []
|
||||||
followersOnly = False
|
followersOnly = False
|
||||||
saveToFile = True
|
saveToFile = True
|
||||||
clientToServer = False
|
client_to_server = False
|
||||||
ccUrl = None
|
ccUrl = None
|
||||||
alicePersonCache = {}
|
alicePersonCache = {}
|
||||||
aliceCachedWebfingers = {}
|
aliceCachedWebfingers = {}
|
||||||
|
@ -2186,7 +2186,7 @@ def testGroupFollow(base_dir: str) -> None:
|
||||||
'alice', aliceDomain, alicePort, http_prefix,
|
'alice', aliceDomain, alicePort, http_prefix,
|
||||||
'testgroup', testgroupDomain, testgroupActor,
|
'testgroup', testgroupDomain, testgroupActor,
|
||||||
testgroupPort, http_prefix,
|
testgroupPort, http_prefix,
|
||||||
clientToServer, federationList,
|
client_to_server, federationList,
|
||||||
aliceSendThreads, alicePostLog,
|
aliceSendThreads, alicePostLog,
|
||||||
aliceCachedWebfingers, alicePersonCache,
|
aliceCachedWebfingers, alicePersonCache,
|
||||||
True, __version__, signingPrivateKeyPem)
|
True, __version__, signingPrivateKeyPem)
|
||||||
|
@ -2249,7 +2249,7 @@ def testGroupFollow(base_dir: str) -> None:
|
||||||
bobPostLog = []
|
bobPostLog = []
|
||||||
followersOnly = False
|
followersOnly = False
|
||||||
saveToFile = True
|
saveToFile = True
|
||||||
clientToServer = False
|
client_to_server = False
|
||||||
ccUrl = None
|
ccUrl = None
|
||||||
bobPersonCache = {}
|
bobPersonCache = {}
|
||||||
bobCachedWebfingers = {}
|
bobCachedWebfingers = {}
|
||||||
|
@ -2263,7 +2263,7 @@ def testGroupFollow(base_dir: str) -> None:
|
||||||
'bob', bobDomain, bobPort, http_prefix,
|
'bob', bobDomain, bobPort, http_prefix,
|
||||||
'testgroup', testgroupDomain, testgroupActor,
|
'testgroup', testgroupDomain, testgroupActor,
|
||||||
testgroupPort, http_prefix,
|
testgroupPort, http_prefix,
|
||||||
clientToServer, federationList,
|
client_to_server, federationList,
|
||||||
bobSendThreads, bobPostLog,
|
bobSendThreads, bobPostLog,
|
||||||
bobCachedWebfingers, bobPersonCache,
|
bobCachedWebfingers, bobPersonCache,
|
||||||
True, __version__, signingPrivateKeyPem)
|
True, __version__, signingPrivateKeyPem)
|
||||||
|
@ -2350,7 +2350,7 @@ def testGroupFollow(base_dir: str) -> None:
|
||||||
sessionAlice, aliceDir, 'alice', aliceDomain, alicePort,
|
sessionAlice, aliceDir, 'alice', aliceDomain, alicePort,
|
||||||
'testgroup', testgroupDomain, testgroupPort, ccUrl,
|
'testgroup', testgroupDomain, testgroupPort, ccUrl,
|
||||||
http_prefix, "Alice group message", followersOnly,
|
http_prefix, "Alice group message", followersOnly,
|
||||||
saveToFile, clientToServer, True,
|
saveToFile, client_to_server, True,
|
||||||
None, None, None, city, federationList,
|
None, None, None, city, federationList,
|
||||||
aliceSendThreads, alicePostLog, aliceCachedWebfingers,
|
aliceSendThreads, alicePostLog, aliceCachedWebfingers,
|
||||||
alicePersonCache, isArticle, systemLanguage,
|
alicePersonCache, isArticle, systemLanguage,
|
||||||
|
@ -2676,7 +2676,7 @@ def _testCreatePerson(base_dir: str):
|
||||||
password = 'mypass'
|
password = 'mypass'
|
||||||
port = 80
|
port = 80
|
||||||
http_prefix = 'https'
|
http_prefix = 'https'
|
||||||
clientToServer = False
|
client_to_server = False
|
||||||
base_dir = currDir + '/.tests_createperson'
|
base_dir = currDir + '/.tests_createperson'
|
||||||
if os.path.isdir(base_dir):
|
if os.path.isdir(base_dir):
|
||||||
shutil.rmtree(base_dir, ignore_errors=False, onerror=None)
|
shutil.rmtree(base_dir, ignore_errors=False, onerror=None)
|
||||||
|
@ -2711,7 +2711,7 @@ def _testCreatePerson(base_dir: str):
|
||||||
low_bandwidth = True
|
low_bandwidth = True
|
||||||
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
|
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
|
||||||
createPublicPost(base_dir, nickname, domain, port, http_prefix,
|
createPublicPost(base_dir, nickname, domain, port, http_prefix,
|
||||||
content, followersOnly, saveToFile, clientToServer,
|
content, followersOnly, saveToFile, client_to_server,
|
||||||
commentsEnabled, attachImageFilename, mediaType,
|
commentsEnabled, attachImageFilename, mediaType,
|
||||||
'Not suitable for Vogons', 'London, England',
|
'Not suitable for Vogons', 'London, England',
|
||||||
testInReplyTo, testInReplyToAtomUri,
|
testInReplyTo, testInReplyToAtomUri,
|
||||||
|
@ -4236,7 +4236,7 @@ def _testReplyToPublicPost(base_dir: str) -> None:
|
||||||
content = "@ninjarodent@rat.site This is a test."
|
content = "@ninjarodent@rat.site This is a test."
|
||||||
followersOnly = False
|
followersOnly = False
|
||||||
saveToFile = False
|
saveToFile = False
|
||||||
clientToServer = False
|
client_to_server = False
|
||||||
commentsEnabled = True
|
commentsEnabled = True
|
||||||
attachImageFilename = None
|
attachImageFilename = None
|
||||||
mediaType = None
|
mediaType = None
|
||||||
|
@ -4256,7 +4256,7 @@ def _testReplyToPublicPost(base_dir: str) -> None:
|
||||||
reply = \
|
reply = \
|
||||||
createPublicPost(base_dir, nickname, domain, port, http_prefix,
|
createPublicPost(base_dir, nickname, domain, port, http_prefix,
|
||||||
content, followersOnly, saveToFile,
|
content, followersOnly, saveToFile,
|
||||||
clientToServer, commentsEnabled,
|
client_to_server, commentsEnabled,
|
||||||
attachImageFilename, mediaType,
|
attachImageFilename, mediaType,
|
||||||
imageDescription, city, testInReplyTo,
|
imageDescription, city, testInReplyTo,
|
||||||
testInReplyToAtomUri,
|
testInReplyToAtomUri,
|
||||||
|
@ -4781,7 +4781,7 @@ def _testLinksWithinPost(base_dir: str) -> None:
|
||||||
'ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/v4/\n\nhttps://libreserver.org'
|
'ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/v4/\n\nhttps://libreserver.org'
|
||||||
followersOnly = False
|
followersOnly = False
|
||||||
saveToFile = False
|
saveToFile = False
|
||||||
clientToServer = False
|
client_to_server = False
|
||||||
commentsEnabled = True
|
commentsEnabled = True
|
||||||
attachImageFilename = None
|
attachImageFilename = None
|
||||||
mediaType = None
|
mediaType = None
|
||||||
|
@ -4802,7 +4802,7 @@ def _testLinksWithinPost(base_dir: str) -> None:
|
||||||
postJsonObject = \
|
postJsonObject = \
|
||||||
createPublicPost(base_dir, nickname, domain, port, http_prefix,
|
createPublicPost(base_dir, nickname, domain, port, http_prefix,
|
||||||
content, followersOnly, saveToFile,
|
content, followersOnly, saveToFile,
|
||||||
clientToServer, commentsEnabled,
|
client_to_server, commentsEnabled,
|
||||||
attachImageFilename, mediaType,
|
attachImageFilename, mediaType,
|
||||||
imageDescription, city,
|
imageDescription, city,
|
||||||
testInReplyTo, testInReplyToAtomUri,
|
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'
|
'ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/v4/\n\nhttps://libreserver.org'
|
||||||
followersOnly = False
|
followersOnly = False
|
||||||
saveToFile = False
|
saveToFile = False
|
||||||
clientToServer = False
|
client_to_server = False
|
||||||
commentsEnabled = True
|
commentsEnabled = True
|
||||||
attachImageFilename = None
|
attachImageFilename = None
|
||||||
mediaType = None
|
mediaType = None
|
||||||
|
@ -5789,7 +5789,7 @@ def _testCanReplyTo(base_dir: str) -> None:
|
||||||
postJsonObject = \
|
postJsonObject = \
|
||||||
createPublicPost(base_dir, nickname, domain, port, http_prefix,
|
createPublicPost(base_dir, nickname, domain, port, http_prefix,
|
||||||
content, followersOnly, saveToFile,
|
content, followersOnly, saveToFile,
|
||||||
clientToServer, commentsEnabled,
|
client_to_server, commentsEnabled,
|
||||||
attachImageFilename, mediaType,
|
attachImageFilename, mediaType,
|
||||||
imageDescription, city,
|
imageDescription, city,
|
||||||
testInReplyTo, testInReplyToAtomUri,
|
testInReplyTo, testInReplyToAtomUri,
|
||||||
|
|
Loading…
Reference in New Issue