From 5494d6afc8315ce4af6953dfefd31bf5f755209e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 17 Oct 2019 23:35:56 +0100 Subject: [PATCH] Search using channel --- webinterface.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/webinterface.py b/webinterface.py index 050cfbfb..3c62360a 100644 --- a/webinterface.py +++ b/webinterface.py @@ -3121,7 +3121,10 @@ def htmlProfileAfterSearch(translate: {}, \ debug: bool,projectVersion: str) -> str: """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) searchDomain,searchPort=getDomainFromActor(profileHandle) else: @@ -3178,6 +3181,9 @@ def htmlProfileAfterSearch(translate: {}, \ print('DEBUG: Webfinger did not return an actor url') return None 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 debug: print('DEBUG: No actor returned from '+personUrl)