forked from indymedia/epicyon
Resolving the webfinger conundrum
parent
8fb223e1aa
commit
1df8ed9c76
11
inbox.py
11
inbox.py
|
@ -157,17 +157,10 @@ def _inboxStorePostToHtmlCache(recentPostsCache: {}, maxRecentPosts: int,
|
|||
if boxname != 'tlevents' and boxname != 'outbox':
|
||||
boxname = 'inbox'
|
||||
|
||||
# check if a cached version of the webfinger request exists
|
||||
requestHandle = nickname + '@' + getFullDomain(domain, port)
|
||||
if cachedWebfingers.get(requestHandle):
|
||||
wfRequest = cachedWebfingers[requestHandle]
|
||||
else:
|
||||
# TODO this may not be correct
|
||||
wfRequest = cachedWebfingers
|
||||
|
||||
individualPostAsHtml(True, recentPostsCache, maxRecentPosts,
|
||||
translate, pageNumber,
|
||||
baseDir, session, wfRequest, personCache,
|
||||
baseDir, session, cachedWebfingers,
|
||||
personCache,
|
||||
nickname, domain, port, postJsonObject,
|
||||
avatarUrl, True, allowDeletion,
|
||||
httpPrefix, __version__, boxname, None,
|
||||
|
|
|
@ -1070,7 +1070,7 @@ def individualPostAsHtml(allowDownloads: bool,
|
|||
recentPostsCache: {}, maxRecentPosts: int,
|
||||
translate: {},
|
||||
pageNumber: int, baseDir: str,
|
||||
session, wfRequest: {}, personCache: {},
|
||||
session, cachedWebfingers: {}, personCache: {},
|
||||
nickname: str, domain: str, port: int,
|
||||
postJsonObject: {},
|
||||
avatarUrl: str, showAvatarOptions: bool,
|
||||
|
@ -1155,7 +1155,8 @@ def individualPostAsHtml(allowDownloads: bool,
|
|||
if domainFull not in postActor:
|
||||
(inboxUrl, pubKeyId, pubKey,
|
||||
fromPersonId, sharedInbox,
|
||||
avatarUrl2, displayName) = getPersonBox(baseDir, session, wfRequest,
|
||||
avatarUrl2, displayName) = getPersonBox(baseDir, session,
|
||||
cachedWebfingers,
|
||||
personCache,
|
||||
projectVersion, httpPrefix,
|
||||
nickname, domain, 'outbox',
|
||||
|
|
|
@ -260,18 +260,10 @@ def htmlProfileAfterSearch(cssCache: {},
|
|||
if not item.get('object'):
|
||||
continue
|
||||
|
||||
# check if a cached version of the webfinger request exists
|
||||
requestHandle = nickname + '@' + getFullDomain(domain, port)
|
||||
if cachedWebfingers.get(requestHandle):
|
||||
wfRequest = cachedWebfingers[requestHandle]
|
||||
else:
|
||||
# TODO this may not be correct
|
||||
wfRequest = cachedWebfingers
|
||||
|
||||
profileStr += \
|
||||
individualPostAsHtml(True, recentPostsCache, maxRecentPosts,
|
||||
translate, None, baseDir,
|
||||
session, wfRequest, personCache,
|
||||
session, cachedWebfingers, personCache,
|
||||
nickname, domain, port,
|
||||
item, avatarUrl, False, False,
|
||||
httpPrefix, projectVersion, 'inbox',
|
||||
|
|
Loading…
Reference in New Issue