main
Bob Mottram 2021-01-10 12:32:09 +00:00
parent f7c84beb2c
commit c807dc075c
2 changed files with 12 additions and 2 deletions

View File

@ -1530,10 +1530,20 @@ def _individualFollowAsHtml(translate: {},
if not avatarUrl: if not avatarUrl:
avatarUrl = followUrl + '/avatar.png' avatarUrl = followUrl + '/avatar.png'
if domain not in followUrl: if domain not in followUrl:
# lookup the correct webfinger for the followUrl
followUrlNickname = getNicknameFromActor(followUrl)
followUrlDomain, followUrlPort = getDomainFromActor(followUrl)
followUrlDomainFull = getFullDomain(followUrlDomain, followUrlPort)
followUrlHandle = followUrlNickname + '@' + followUrlDomainFull
followUrlWf = \
webfingerHandle(session, followUrlHandle, httpPrefix,
cachedWebfingers,
domain, __version__)
(inboxUrl, pubKeyId, pubKey, (inboxUrl, pubKeyId, pubKey,
fromPersonId, sharedInbox, fromPersonId, sharedInbox,
avatarUrl2, displayName) = getPersonBox(baseDir, session, avatarUrl2, displayName) = getPersonBox(baseDir, session,
cachedWebfingers, followUrlWf,
personCache, projectVersion, personCache, projectVersion,
httpPrefix, nickname, httpPrefix, nickname,
domain, 'outbox', 43036) domain, 'outbox', 43036)

View File

@ -352,4 +352,4 @@ def webfingerUpdate(baseDir: str, nickname: str, domain: str,
if _webfingerUpdateFromProfile(wfJson, actorJson): if _webfingerUpdateFromProfile(wfJson, actorJson):
if saveJson(wfJson, filename): if saveJson(wfJson, filename):
cachedWebfingers[handle] = wfJson storeWebfingerInCache(handle, wfJson, cachedWebfingers)