From 14fbed456a87c4759301906d24d4091327f80734 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 29 Dec 2020 09:52:52 +0000 Subject: [PATCH] Add emoji to CW --- webapp_post.py | 8 ++++++-- webapp_utils.py | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/webapp_post.py b/webapp_post.py index c58840ae2..3d9552412 100644 --- a/webapp_post.py +++ b/webapp_post.py @@ -1498,8 +1498,12 @@ def individualPostAsHtml(allowDownloads: bool, postID = 'post' + str(createPassword(8)) contentStr = '' if postJsonObject['object'].get('summary'): - contentStr += \ - '' + str(postJsonObject['object']['summary']) + '\n ' + cwStr = str(postJsonObject['object']['summary']) + cwStr = \ + addEmojiToDisplayName(baseDir, httpPrefix, + nickname, domain, + cwStr, False) + contentStr += '' + cwStr + '\n ' if isModerationPost: containerClass = 'container report' # get the content warning text diff --git a/webapp_utils.py b/webapp_utils.py index 67947e644..02e30a78f 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -576,7 +576,7 @@ def loadIndividualPostAsHtmlFromCache(baseDir: str, def addEmojiToDisplayName(baseDir: str, httpPrefix: str, nickname: str, domain: str, displayName: str, inProfileName: bool) -> str: - """Adds emoji icons to display names on individual posts + """Adds emoji icons to display names or CW on individual posts """ if ':' not in displayName: return displayName