forked from indymedia/epicyon
Search using channel
parent
92214ef5ed
commit
5494d6afc8
|
@ -3121,7 +3121,10 @@ def htmlProfileAfterSearch(translate: {}, \
|
||||||
debug: bool,projectVersion: str) -> str:
|
debug: bool,projectVersion: str) -> str:
|
||||||
"""Show a profile page after a search for a fediverse address
|
"""Show a profile page after a search for a fediverse address
|
||||||
"""
|
"""
|
||||||
if '/users/' in profileHandle or '/@' in profileHandle:
|
if '/users/' in profileHandle or \
|
||||||
|
'/channel/' in profileHandle or \
|
||||||
|
'/profile/' in profileHandle or \
|
||||||
|
'/@' in profileHandle:
|
||||||
searchNickname=getNicknameFromActor(profileHandle)
|
searchNickname=getNicknameFromActor(profileHandle)
|
||||||
searchDomain,searchPort=getDomainFromActor(profileHandle)
|
searchDomain,searchPort=getDomainFromActor(profileHandle)
|
||||||
else:
|
else:
|
||||||
|
@ -3178,6 +3181,9 @@ def htmlProfileAfterSearch(translate: {}, \
|
||||||
print('DEBUG: Webfinger did not return an actor url')
|
print('DEBUG: Webfinger did not return an actor url')
|
||||||
return None
|
return None
|
||||||
profileJson = getJson(session,personUrl,asHeader,None,projectVersion,httpPrefix,domain)
|
profileJson = getJson(session,personUrl,asHeader,None,projectVersion,httpPrefix,domain)
|
||||||
|
if not profileJson:
|
||||||
|
asHeader = {'Accept': 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'}
|
||||||
|
profileJson = getJson(session,personUrl,asHeader,None,projectVersion,httpPrefix,domain)
|
||||||
if not profileJson:
|
if not profileJson:
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: No actor returned from '+personUrl)
|
print('DEBUG: No actor returned from '+personUrl)
|
||||||
|
|
Loading…
Reference in New Issue