forked from indymedia/epicyon
Only store webfinger in cache if returned
parent
0f1ad061ec
commit
959c1080c7
|
@ -6004,7 +6004,6 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
searchStr = searchStr.replace('+', ' ')
|
||||
searchStr = \
|
||||
urllib.parse.unquote(searchStr.strip())
|
||||
if self.server.debug:
|
||||
print('searchStr: ' + searchStr)
|
||||
if searchForEmoji:
|
||||
searchStr = ':' + searchStr + ':'
|
||||
|
|
|
@ -44,6 +44,8 @@ def parseHandle(handle: str) -> (str, str):
|
|||
def webfingerHandle(session, handle: str, httpPrefix: str,
|
||||
cachedWebfingers: {},
|
||||
fromDomain: str, projectVersion: str) -> {}:
|
||||
"""
|
||||
"""
|
||||
if not session:
|
||||
print('WARN: No session specified for webfingerHandle')
|
||||
return None
|
||||
|
@ -81,6 +83,8 @@ def webfingerHandle(session, handle: str, httpPrefix: str,
|
|||
print('params: ' + str(par))
|
||||
print(e)
|
||||
return None
|
||||
|
||||
if result:
|
||||
storeWebfingerInCache(nickname + '@' + wfDomain,
|
||||
result, cachedWebfingers)
|
||||
return result
|
||||
|
|
|
@ -5846,7 +5846,6 @@ def htmlProfileAfterSearch(recentPostsCache: {}, maxRecentPosts: int,
|
|||
httpPrefix, wfRequest,
|
||||
domain, projectVersion)
|
||||
if not wf:
|
||||
if debug:
|
||||
print('DEBUG: Unable to webfinger ' +
|
||||
searchNickname + '@' + searchDomainFull)
|
||||
return None
|
||||
|
@ -5878,7 +5877,6 @@ def htmlProfileAfterSearch(recentPostsCache: {}, maxRecentPosts: int,
|
|||
getJson(session, personUrl, asHeader, None,
|
||||
projectVersion, httpPrefix, domain)
|
||||
if not profileJson:
|
||||
if debug:
|
||||
print('DEBUG: No actor returned from ' + personUrl)
|
||||
return None
|
||||
avatarUrl = ''
|
||||
|
|
Loading…
Reference in New Issue