mirror of
https://gitlab.com/bashrc2/epicyon
synced 2026-11-01 18:29:54 +00:00
Check for single webfinger
This commit is contained in:
1 parent
56ba0f28d7
commit
e7252a643f
2 files changed
+9
-4
No files matched your search
@@ -218,10 +218,6 @@ def getPersonBox(baseDir: str, session, wfRequest: {},
|
||||
'Accept': 'application/activity+json; profile="' + profileStr + '"'
|
||||
}
|
||||
if not wfRequest.get('errors'):
|
||||
# if len(wfRequest.items()) == 1:
|
||||
# for wfkey, wf in wfRequest.items():
|
||||
# wfRequest = wf
|
||||
# print('wfRequest changed to ' + str(wfRequest))
|
||||
personUrl = getUserUrl(wfRequest, sourceId)
|
||||
else:
|
||||
if nickname == 'dev':
|
||||
|
||||
@@ -1163,6 +1163,15 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||
postActorWf = cachedWebfingers[postActorHandle]
|
||||
print('postActorWf: ' + postActorHandle + ' ' + str(postActorWf))
|
||||
|
||||
# check for situations where the webfinger contains a single key
|
||||
# which is the handle, with the webfinger content as the item
|
||||
if len(postActorWf.items()) == 1:
|
||||
for wfkey, wf in postActorWf.items():
|
||||
print('Single webfinger key: ' + wfkey + ' ' + postActorHandle)
|
||||
if wfkey == postActorHandle:
|
||||
postActorWf = wf
|
||||
print('wfRequest changed to ' + str(postActorWf))
|
||||
|
||||
(inboxUrl, pubKeyId, pubKey,
|
||||
fromPersonId, sharedInbox,
|
||||
avatarUrl2, displayName) = getPersonBox(baseDir, session,
|
||||
|
||||
Reference in new issue
Block a user