From 5e6e2f80c5d35248580b74a7acca9a53cf922110 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 20 Dec 2020 13:01:12 +0000 Subject: [PATCH] Displaying account avatars --- daemon.py | 6 ++++++ webapp_moderation.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/daemon.py b/daemon.py index 35d8232f5..c7935efac 100644 --- a/daemon.py +++ b/daemon.py @@ -5084,6 +5084,12 @@ class PubServer(BaseHTTPRequestHandler): optionsActor = optionsList[0] optionsPageNumber = optionsList[1] optionsProfileUrl = optionsList[2] + if '.' in optionsProfileUrl and \ + optionsProfileUrl.startswith('/members/'): + ext = optionsProfileUrl.split('.')[-1] + optionsProfileUrl = optionsProfileUrl.split('/members/')[0] + optionsProfileUrl = \ + '/users/' + optionsProfileUrl + '/avatar.' + ext if optionsPageNumber.isdigit(): pageNumber = int(optionsPageNumber) optionsLink = None diff --git a/webapp_moderation.py b/webapp_moderation.py index 216825855..dcf2abd97 100644 --- a/webapp_moderation.py +++ b/webapp_moderation.py @@ -194,7 +194,7 @@ def htmlModerationInfo(cssCache: {}, translate: {}, avatarUrl = actorJson['icon']['url'] acctUrl = \ '/users/' + nickname + '?options=' + actor + ';1;' + \ - '/avatars/' + avatarUrl.replace('/', '-') + '/members/' + acctNickname infoForm += '\n' infoForm += ''