From da256d24d2e12c12f3c2a6e17da6f036a51a7015 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 20 Dec 2020 13:28:33 +0000 Subject: [PATCH] Get the avatar extension --- webapp_moderation.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webapp_moderation.py b/webapp_moderation.py index dcf2abd97..b5d0b3b28 100644 --- a/webapp_moderation.py +++ b/webapp_moderation.py @@ -189,12 +189,15 @@ def htmlModerationInfo(cssCache: {}, translate: {}, continue actor = actorJson['id'] avatarUrl = '' + ext = '' if actorJson.get('icon'): if actorJson['icon'].get('url'): avatarUrl = actorJson['icon']['url'] + if '.' in avatarUrl: + ext = avatarUrl.split('.')[-1] acctUrl = \ '/users/' + nickname + '?options=' + actor + ';1;' + \ - '/members/' + acctNickname + '/members/' + acctNickname + ext infoForm += '\n' infoForm += ''