From b870a6954528ef18ea93259349cce5fb534f7b63 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 4 Jul 2021 23:46:53 +0100 Subject: [PATCH] Tidying --- person.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/person.py b/person.py index 3e670e381..c6fd12e49 100644 --- a/person.py +++ b/person.py @@ -1302,11 +1302,11 @@ def getActorJson(hostDomain: str, handle: str, http: bool, gnunet: bool, if not personUrl: personUrl = getUserUrl(wfRequest, 0, debug) if nickname == domain: - personUrl = personUrl.replace('/users/', '/actor/') - personUrl = personUrl.replace('/accounts/', '/actor/') - personUrl = personUrl.replace('/channel/', '/actor/') - personUrl = personUrl.replace('/profile/', '/actor/') - personUrl = personUrl.replace('/u/', '/actor/') + paths = ( + '/users/', '/accounts/', '/channel/', '/profile/', '/u/' + ) + for userPath in paths: + personUrl = personUrl.replace(userPath, '/actor/') if not personUrl: # try single user instance personUrl = httpPrefix + '://' + domain + '/' + nickname