mirror of https://gitlab.com/bashrc2/epicyon
Check for single webfinger
parent
56ba0f28d7
commit
e7252a643f
4
posts.py
4
posts.py
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue