mirror of https://gitlab.com/bashrc2/epicyon
Trace parameter
parent
2736b7252b
commit
af919974d7
|
@ -369,7 +369,7 @@ def sendAnnounceViaServer(baseDir: str, session,
|
||||||
personCache,
|
personCache,
|
||||||
projectVersion, httpPrefix,
|
projectVersion, httpPrefix,
|
||||||
fromNickname, fromDomain,
|
fromNickname, fromDomain,
|
||||||
postToBox)
|
postToBox, 73528)
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
|
|
@ -123,7 +123,7 @@ def sendAvailabilityViaServer(baseDir: str, session,
|
||||||
avatarUrl, displayName) = getPersonBox(baseDir, session, wfRequest,
|
avatarUrl, displayName) = getPersonBox(baseDir, session, wfRequest,
|
||||||
personCache, projectVersion,
|
personCache, projectVersion,
|
||||||
httpPrefix, nickname,
|
httpPrefix, nickname,
|
||||||
domain, postToBox)
|
domain, postToBox, 57262)
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
|
|
@ -441,7 +441,7 @@ def sendBookmarkViaServer(baseDir: str, session,
|
||||||
fromPersonId, sharedInbox, avatarUrl,
|
fromPersonId, sharedInbox, avatarUrl,
|
||||||
displayName) = getPersonBox(baseDir, session, wfRequest, personCache,
|
displayName) = getPersonBox(baseDir, session, wfRequest, personCache,
|
||||||
projectVersion, httpPrefix, fromNickname,
|
projectVersion, httpPrefix, fromNickname,
|
||||||
fromDomain, postToBox)
|
fromDomain, postToBox, 72483)
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
@ -518,7 +518,7 @@ def sendUndoBookmarkViaServer(baseDir: str, session,
|
||||||
fromPersonId, sharedInbox, avatarUrl,
|
fromPersonId, sharedInbox, avatarUrl,
|
||||||
displayName) = getPersonBox(baseDir, session, wfRequest, personCache,
|
displayName) = getPersonBox(baseDir, session, wfRequest, personCache,
|
||||||
projectVersion, httpPrefix, fromNickname,
|
projectVersion, httpPrefix, fromNickname,
|
||||||
fromDomain, postToBox)
|
fromDomain, postToBox, 72528)
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
|
|
@ -136,7 +136,7 @@ def sendDeleteViaServer(baseDir: str, session,
|
||||||
fromPersonId, sharedInbox, avatarUrl,
|
fromPersonId, sharedInbox, avatarUrl,
|
||||||
displayName) = getPersonBox(baseDir, session, wfRequest, personCache,
|
displayName) = getPersonBox(baseDir, session, wfRequest, personCache,
|
||||||
projectVersion, httpPrefix, fromNickname,
|
projectVersion, httpPrefix, fromNickname,
|
||||||
fromDomain, postToBox)
|
fromDomain, postToBox, 53036)
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
|
|
@ -995,7 +995,7 @@ def sendFollowRequestViaServer(baseDir: str, session,
|
||||||
fromPersonId, sharedInbox, avatarUrl,
|
fromPersonId, sharedInbox, avatarUrl,
|
||||||
displayName) = getPersonBox(baseDir, session, wfRequest, personCache,
|
displayName) = getPersonBox(baseDir, session, wfRequest, personCache,
|
||||||
projectVersion, httpPrefix, fromNickname,
|
projectVersion, httpPrefix, fromNickname,
|
||||||
fromDomain, postToBox)
|
fromDomain, postToBox, 52025)
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
@ -1086,7 +1086,8 @@ def sendUnfollowRequestViaServer(baseDir: str, session,
|
||||||
wfRequest, personCache,
|
wfRequest, personCache,
|
||||||
projectVersion, httpPrefix,
|
projectVersion, httpPrefix,
|
||||||
fromNickname,
|
fromNickname,
|
||||||
fromDomain, postToBox)
|
fromDomain, postToBox,
|
||||||
|
76536)
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
|
5
like.py
5
like.py
|
@ -257,7 +257,7 @@ def sendLikeViaServer(baseDir: str, session,
|
||||||
personCache,
|
personCache,
|
||||||
projectVersion, httpPrefix,
|
projectVersion, httpPrefix,
|
||||||
fromNickname, fromDomain,
|
fromNickname, fromDomain,
|
||||||
postToBox)
|
postToBox, 72873)
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
@ -335,7 +335,8 @@ def sendUndoLikeViaServer(baseDir: str, session,
|
||||||
avatarUrl, displayName) = getPersonBox(baseDir, session, wfRequest,
|
avatarUrl, displayName) = getPersonBox(baseDir, session, wfRequest,
|
||||||
personCache, projectVersion,
|
personCache, projectVersion,
|
||||||
httpPrefix, fromNickname,
|
httpPrefix, fromNickname,
|
||||||
fromDomain, postToBox)
|
fromDomain, postToBox,
|
||||||
|
72625)
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
|
35
posts.py
35
posts.py
|
@ -141,13 +141,13 @@ def cleanHtml(rawHtml: str) -> str:
|
||||||
return html.unescape(text)
|
return html.unescape(text)
|
||||||
|
|
||||||
|
|
||||||
def getUserUrl(wfRequest: {}) -> str:
|
def getUserUrl(wfRequest: {}, sourceId=0) -> str:
|
||||||
"""Gets the actor url from a webfinger request
|
"""Gets the actor url from a webfinger request
|
||||||
"""
|
"""
|
||||||
print('getUserUrl: ' + str(wfRequest))
|
print('getUserUrl: ' + str(sourceId) + ' ' + str(wfRequest))
|
||||||
if not wfRequest.get('links'):
|
if not wfRequest.get('links'):
|
||||||
print('getUserUrl webfinger activity+json contains no links ' +
|
print('getUserUrl webfinger activity+json contains no links ' +
|
||||||
str(wfRequest))
|
str(sourceId) + ' ' + str(wfRequest))
|
||||||
return None
|
return None
|
||||||
for link in wfRequest['links']:
|
for link in wfRequest['links']:
|
||||||
if not (link.get('type') and link.get('href')):
|
if not (link.get('type') and link.get('href')):
|
||||||
|
@ -160,7 +160,7 @@ def getUserUrl(wfRequest: {}) -> str:
|
||||||
'/channel/' in link['href']):
|
'/channel/' in link['href']):
|
||||||
print('getUserUrl webfinger activity+json ' +
|
print('getUserUrl webfinger activity+json ' +
|
||||||
'contains single user instance actor ' +
|
'contains single user instance actor ' +
|
||||||
str(link))
|
str(sourceId) + ' ' + str(link))
|
||||||
return link['href']
|
return link['href']
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@ -207,13 +207,14 @@ def getPersonBox(baseDir: str, session, wfRequest: {},
|
||||||
personCache: {},
|
personCache: {},
|
||||||
projectVersion: str, httpPrefix: str,
|
projectVersion: str, httpPrefix: str,
|
||||||
nickname: str, domain: str,
|
nickname: str, domain: str,
|
||||||
boxName='inbox') -> (str, str, str, str, str, str, str, str):
|
boxName='inbox',
|
||||||
|
sourceId=0) -> (str, str, str, str, str, str, str, str):
|
||||||
profileStr = 'https://www.w3.org/ns/activitystreams'
|
profileStr = 'https://www.w3.org/ns/activitystreams'
|
||||||
asHeader = {
|
asHeader = {
|
||||||
'Accept': 'application/activity+json; profile="' + profileStr + '"'
|
'Accept': 'application/activity+json; profile="' + profileStr + '"'
|
||||||
}
|
}
|
||||||
if not wfRequest.get('errors'):
|
if not wfRequest.get('errors'):
|
||||||
personUrl = getUserUrl(wfRequest)
|
personUrl = getUserUrl(wfRequest, sourceId)
|
||||||
else:
|
else:
|
||||||
if nickname == 'dev':
|
if nickname == 'dev':
|
||||||
# try single user instance
|
# try single user instance
|
||||||
|
@ -1774,7 +1775,8 @@ def sendPost(projectVersion: str,
|
||||||
avatarUrl, displayName) = getPersonBox(baseDir, session, wfRequest,
|
avatarUrl, displayName) = getPersonBox(baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
projectVersion, httpPrefix,
|
projectVersion, httpPrefix,
|
||||||
nickname, domain, postToBox)
|
nickname, domain, postToBox,
|
||||||
|
72533)
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
return 3
|
return 3
|
||||||
|
@ -1889,7 +1891,8 @@ def sendPostViaServer(projectVersion: str,
|
||||||
personCache,
|
personCache,
|
||||||
projectVersion, httpPrefix,
|
projectVersion, httpPrefix,
|
||||||
fromNickname,
|
fromNickname,
|
||||||
fromDomain, postToBox)
|
fromDomain, postToBox,
|
||||||
|
82796)
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: No ' + postToBox + ' was found for ' + handle)
|
print('DEBUG: No ' + postToBox + ' was found for ' + handle)
|
||||||
|
@ -2088,7 +2091,8 @@ def sendSignedJson(postJsonObject: {}, session, baseDir: str,
|
||||||
displayName) = getPersonBox(baseDir, session, wfRequest,
|
displayName) = getPersonBox(baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
projectVersion, httpPrefix,
|
projectVersion, httpPrefix,
|
||||||
nickname, domain, postToBox)
|
nickname, domain, postToBox,
|
||||||
|
30873)
|
||||||
|
|
||||||
print("inboxUrl: " + str(inboxUrl))
|
print("inboxUrl: " + str(inboxUrl))
|
||||||
print("toPersonId: " + str(toPersonId))
|
print("toPersonId: " + str(toPersonId))
|
||||||
|
@ -3396,7 +3400,8 @@ def getPublicPostsOfPerson(baseDir: str, nickname: str, domain: str,
|
||||||
avatarUrl, displayName) = getPersonBox(baseDir, session, wfRequest,
|
avatarUrl, displayName) = getPersonBox(baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
projectVersion, httpPrefix,
|
projectVersion, httpPrefix,
|
||||||
nickname, domain, 'outbox')
|
nickname, domain, 'outbox',
|
||||||
|
62524)
|
||||||
maxMentions = 10
|
maxMentions = 10
|
||||||
maxEmoji = 10
|
maxEmoji = 10
|
||||||
maxAttachments = 5
|
maxAttachments = 5
|
||||||
|
@ -3437,7 +3442,8 @@ def getPublicPostDomains(session, baseDir: str, nickname: str, domain: str,
|
||||||
avatarUrl, displayName) = getPersonBox(baseDir, session, wfRequest,
|
avatarUrl, displayName) = getPersonBox(baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
projectVersion, httpPrefix,
|
projectVersion, httpPrefix,
|
||||||
nickname, domain, 'outbox')
|
nickname, domain, 'outbox',
|
||||||
|
92522)
|
||||||
maxMentions = 99
|
maxMentions = 99
|
||||||
maxEmoji = 99
|
maxEmoji = 99
|
||||||
maxAttachments = 5
|
maxAttachments = 5
|
||||||
|
@ -3480,7 +3486,8 @@ def getPublicPostInfo(session, baseDir: str, nickname: str, domain: str,
|
||||||
avatarUrl, displayName) = getPersonBox(baseDir, session, wfRequest,
|
avatarUrl, displayName) = getPersonBox(baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
projectVersion, httpPrefix,
|
projectVersion, httpPrefix,
|
||||||
nickname, domain, 'outbox')
|
nickname, domain, 'outbox',
|
||||||
|
13863)
|
||||||
maxMentions = 99
|
maxMentions = 99
|
||||||
maxEmoji = 99
|
maxEmoji = 99
|
||||||
maxAttachments = 5
|
maxAttachments = 5
|
||||||
|
@ -3995,7 +4002,7 @@ def sendBlockViaServer(baseDir: str, session,
|
||||||
displayName) = getPersonBox(baseDir, session, wfRequest,
|
displayName) = getPersonBox(baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
projectVersion, httpPrefix, fromNickname,
|
projectVersion, httpPrefix, fromNickname,
|
||||||
fromDomain, postToBox)
|
fromDomain, postToBox, 72652)
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
@ -4077,7 +4084,7 @@ def sendUndoBlockViaServer(baseDir: str, session,
|
||||||
fromPersonId, sharedInbox, avatarUrl,
|
fromPersonId, sharedInbox, avatarUrl,
|
||||||
displayName) = getPersonBox(baseDir, session, wfRequest, personCache,
|
displayName) = getPersonBox(baseDir, session, wfRequest, personCache,
|
||||||
projectVersion, httpPrefix, fromNickname,
|
projectVersion, httpPrefix, fromNickname,
|
||||||
fromDomain, postToBox)
|
fromDomain, postToBox, 53892)
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
|
3
roles.py
3
roles.py
|
@ -316,7 +316,8 @@ def sendRoleViaServer(baseDir: str, session,
|
||||||
wfRequest, personCache,
|
wfRequest, personCache,
|
||||||
projectVersion, httpPrefix,
|
projectVersion, httpPrefix,
|
||||||
delegatorNickname,
|
delegatorNickname,
|
||||||
delegatorDomain, postToBox)
|
delegatorDomain, postToBox,
|
||||||
|
765672)
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
|
|
@ -376,7 +376,8 @@ def sendShareViaServer(baseDir, session,
|
||||||
avatarUrl, displayName) = getPersonBox(baseDir, session, wfRequest,
|
avatarUrl, displayName) = getPersonBox(baseDir, session, wfRequest,
|
||||||
personCache, projectVersion,
|
personCache, projectVersion,
|
||||||
httpPrefix, fromNickname,
|
httpPrefix, fromNickname,
|
||||||
fromDomain, postToBox)
|
fromDomain, postToBox,
|
||||||
|
83653)
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
@ -474,7 +475,8 @@ def sendUndoShareViaServer(baseDir: str, session,
|
||||||
avatarUrl, displayName) = getPersonBox(baseDir, session, wfRequest,
|
avatarUrl, displayName) = getPersonBox(baseDir, session, wfRequest,
|
||||||
personCache, projectVersion,
|
personCache, projectVersion,
|
||||||
httpPrefix, fromNickname,
|
httpPrefix, fromNickname,
|
||||||
fromDomain, postToBox)
|
fromDomain, postToBox,
|
||||||
|
12663)
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
|
|
@ -152,7 +152,7 @@ def sendSkillViaServer(baseDir: str, session, nickname: str, password: str,
|
||||||
avatarUrl, displayName) = getPersonBox(baseDir, session, wfRequest,
|
avatarUrl, displayName) = getPersonBox(baseDir, session, wfRequest,
|
||||||
personCache, projectVersion,
|
personCache, projectVersion,
|
||||||
httpPrefix, nickname, domain,
|
httpPrefix, nickname, domain,
|
||||||
postToBox)
|
postToBox, 86725)
|
||||||
|
|
||||||
if not inboxUrl:
|
if not inboxUrl:
|
||||||
if debug:
|
if debug:
|
||||||
|
|
|
@ -65,7 +65,8 @@ def instancesGraph(baseDir: str, handles: str,
|
||||||
avatarUrl, displayName) = getPersonBox(baseDir, session, wfRequest,
|
avatarUrl, displayName) = getPersonBox(baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
projectVersion, httpPrefix,
|
projectVersion, httpPrefix,
|
||||||
nickname, domain, 'outbox')
|
nickname, domain, 'outbox',
|
||||||
|
27261)
|
||||||
postDomains = \
|
postDomains = \
|
||||||
getPostDomains(session, personUrl, 64, maxMentions, maxEmoji,
|
getPostDomains(session, personUrl, 64, maxMentions, maxEmoji,
|
||||||
maxAttachments, federationList,
|
maxAttachments, federationList,
|
||||||
|
|
|
@ -1179,7 +1179,8 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
avatarUrl2, displayName) = getPersonBox(baseDir, session, wfRequest,
|
avatarUrl2, displayName) = getPersonBox(baseDir, session, wfRequest,
|
||||||
personCache,
|
personCache,
|
||||||
projectVersion, httpPrefix,
|
projectVersion, httpPrefix,
|
||||||
nickname, domain, 'outbox')
|
nickname, domain, 'outbox',
|
||||||
|
72367)
|
||||||
logPostTiming(enableTimingLog, postStartTime, '6')
|
logPostTiming(enableTimingLog, postStartTime, '6')
|
||||||
|
|
||||||
if avatarUrl2:
|
if avatarUrl2:
|
||||||
|
|
|
@ -1457,7 +1457,7 @@ def individualFollowAsHtml(translate: {},
|
||||||
avatarUrl2, displayName) = getPersonBox(baseDir, session, wfRequest,
|
avatarUrl2, displayName) = getPersonBox(baseDir, session, wfRequest,
|
||||||
personCache, projectVersion,
|
personCache, projectVersion,
|
||||||
httpPrefix, nickname,
|
httpPrefix, nickname,
|
||||||
domain, 'outbox')
|
domain, 'outbox', 43036)
|
||||||
if avatarUrl2:
|
if avatarUrl2:
|
||||||
avatarUrl = avatarUrl2
|
avatarUrl = avatarUrl2
|
||||||
if displayName:
|
if displayName:
|
||||||
|
|
Loading…
Reference in New Issue