From c6e947f22e2f40a2238dd2fe03d77986bd00140f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 1 Dec 2020 12:04:59 +0000 Subject: [PATCH] Function for announcing with a display name --- webapp_post.py | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/webapp_post.py b/webapp_post.py index 329d11f3..93d0e8b5 100644 --- a/webapp_post.py +++ b/webapp_post.py @@ -692,6 +692,22 @@ def announceWithoutDisplayNameHtml(translate: {}, iconsPath: str, announceNickname + '@' + announceDomain + '\n' +def announceWithDisplayNameHtml(translate: {}, + iconsPath: str, + postJsonObject: {}, + announceDisplayName: str) -> str: + """Returns html for an announce having a display name + """ + return ' ' + \
+        translate['announces'] + '\n' + \ + ' ' + announceDisplayName + '\n' + + def getPostTitleAnnounceHtml(baseDir: str, httpPrefix: str, nickname: str, domain: str, @@ -767,16 +783,10 @@ def getPostTitleAnnounceHtml(baseDir: str, ' 13.3.1 = ' + str(timeDiff)) titleStr += \ - ' ' + \ - '' + \
-                        translate['announces'] + '\n' + \ - ' ' + \ - announceDisplayName + '\n' + announceWithDisplayNameHtml(translate, + iconsPath, + postJsonObject, + announceDisplayName) # show avatar of person replied to announceActor = \ postJsonObject['object']['attributedTo']