diff --git a/webapp_post.py b/webapp_post.py
index 2fff0ce6..329d11f3 100644
--- a/webapp_post.py
+++ b/webapp_post.py
@@ -661,7 +661,8 @@ def boostOwnTootHtml(translate: {}, iconsPath) -> str:
'/repeat_inactive.png" class="announceOrReply"/>\n'
-def announceUnattributedHtml(translate: {}, iconsPath: str) -> str:
+def announceUnattributedHtml(translate: {}, iconsPath: str,
+ postJsonObject: {}) -> str:
"""Returns the html for an announce title where there
is no attribution on the announced post
"""
@@ -675,6 +676,22 @@ def announceUnattributedHtml(translate: {}, iconsPath: str) -> str:
'" class="announceOrReply">@unattributed\n'
+def announceWithoutDisplayNameHtml(translate: {}, iconsPath: str,
+ announceNickname: str,
+ announceDomain: str,
+ postJsonObject: {}) -> str:
+ """Returns html for an announce title where there is no display name
+ only a handle nick@domain
+ """
+ return ' \n' + \
+ ' @' + \
+ announceNickname + '@' + announceDomain + '\n'
+
+
def getPostTitleAnnounceHtml(baseDir: str,
httpPrefix: str,
nickname: str, domain: str,
@@ -734,6 +751,7 @@ def getPostTitleAnnounceHtml(baseDir: str,
print('TIMING INDIV ' + boxName +
' 13.3 = ' + str(timeDiff))
+ # add any emoji to the display name
if ':' in announceDisplayName:
announceDisplayName = \
addEmojiToDisplayName(baseDir, httpPrefix,
@@ -796,23 +814,17 @@ def getPostTitleAnnounceHtml(baseDir: str,
'/>\n \n'
else:
titleStr += \
- ' \n' + \
- ' @' + \
- announceNickname + '@' + \
- announceDomain + '\n'
+ announceWithoutDisplayNameHtml(translate, iconsPath,
+ announceNickname,
+ announceDomain,
+ postJsonObject)
else:
titleStr += \
- announceUnattributedHtml(translate, iconsPath)
+ announceUnattributedHtml(translate, iconsPath,
+ postJsonObject)
else:
titleStr += \
- announceUnattributedHtml(translate, iconsPath)
+ announceUnattributedHtml(translate, iconsPath, postJsonObject)
return (titleStr, replyAvatarImageInPost,
containerClassIcons, containerClass)