mirror of https://gitlab.com/bashrc2/epicyon
Lookup webfinger
parent
ccc814daf5
commit
596d36d33e
|
@ -61,6 +61,7 @@ from webapp_utils import getBrokenLinkSubstitute
|
||||||
from webapp_media import addEmbeddedElements
|
from webapp_media import addEmbeddedElements
|
||||||
from webapp_question import insertQuestion
|
from webapp_question import insertQuestion
|
||||||
from devices import E2EEdecryptMessageFromDevice
|
from devices import E2EEdecryptMessageFromDevice
|
||||||
|
from webfinger import webfingerHandle
|
||||||
|
|
||||||
|
|
||||||
def _logPostTiming(enableTimingLog: bool, postStartTime, debugId: str) -> None:
|
def _logPostTiming(enableTimingLog: bool, postStartTime, debugId: str) -> None:
|
||||||
|
@ -1158,10 +1159,10 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
postActorDomain, postActorPort = getDomainFromActor(postActor)
|
postActorDomain, postActorPort = getDomainFromActor(postActor)
|
||||||
postActorDomainFull = getFullDomain(postActorDomain, postActorPort)
|
postActorDomainFull = getFullDomain(postActorDomain, postActorPort)
|
||||||
postActorHandle = postActorNickname + '@' + postActorDomainFull
|
postActorHandle = postActorNickname + '@' + postActorDomainFull
|
||||||
postActorWf = cachedWebfingers
|
postActorWf = \
|
||||||
if cachedWebfingers.get(postActorHandle):
|
webfingerHandle(session, postActorHandle, httpPrefix,
|
||||||
postActorWf = cachedWebfingers[postActorHandle]
|
cachedWebfingers,
|
||||||
print('postActorWf: ' + postActorHandle + ' ' + str(postActorWf))
|
domain, __version__)
|
||||||
|
|
||||||
# check for situations where the webfinger contains a single key
|
# check for situations where the webfinger contains a single key
|
||||||
# which is the handle, with the webfinger content as the item
|
# which is the handle, with the webfinger content as the item
|
||||||
|
@ -1172,14 +1173,19 @@ def individualPostAsHtml(allowDownloads: bool,
|
||||||
postActorWf = wf
|
postActorWf = wf
|
||||||
print('wfRequest changed to ' + str(postActorWf))
|
print('wfRequest changed to ' + str(postActorWf))
|
||||||
|
|
||||||
|
avatarUrl2 = None
|
||||||
|
displayName = None
|
||||||
|
if postActorWf:
|
||||||
(inboxUrl, pubKeyId, pubKey,
|
(inboxUrl, pubKeyId, pubKey,
|
||||||
fromPersonId, sharedInbox,
|
fromPersonId, sharedInbox,
|
||||||
avatarUrl2, displayName) = getPersonBox(baseDir, session,
|
avatarUrl2, displayName) = getPersonBox(baseDir, session,
|
||||||
postActorWf,
|
postActorWf,
|
||||||
personCache,
|
personCache,
|
||||||
projectVersion, httpPrefix,
|
projectVersion,
|
||||||
nickname, domain, 'outbox',
|
httpPrefix,
|
||||||
72367)
|
nickname, domain,
|
||||||
|
'outbox', 72367)
|
||||||
|
|
||||||
_logPostTiming(enableTimingLog, postStartTime, '6')
|
_logPostTiming(enableTimingLog, postStartTime, '6')
|
||||||
|
|
||||||
if avatarUrl2:
|
if avatarUrl2:
|
||||||
|
|
Loading…
Reference in New Issue