diff --git a/webapp_post.py b/webapp_post.py
index 93d0e8b5..9d6349a7 100644
--- a/webapp_post.py
+++ b/webapp_post.py
@@ -840,6 +840,208 @@ def getPostTitleAnnounceHtml(baseDir: str,
containerClassIcons, containerClass)
+def replyToYourselfHtml(translate: {}, iconsPath: str) -> str:
+ """Returns html for a title which is a reply to yourself
+ """
+ return ' \n'
+
+
+def getPostTitleReplyHtml(baseDir: str,
+ httpPrefix: str,
+ nickname: str, domain: str,
+ showRepeatIcon: bool,
+ isAnnounced: bool,
+ postJsonObject: {},
+ postActor: str,
+ translate: {},
+ iconsPath: str,
+ enableTimingLog: bool,
+ postStartTime,
+ boxName: str,
+ personCache: {},
+ allowDownloads: bool,
+ avatarPosition: str,
+ pageNumber: int,
+ messageIdStr: str,
+ containerClassIcons: str,
+ containerClass: str) -> (str, str, str, str):
+ """Returns the reply title of a post containing names of participants
+ x replies to y
+ """
+ titleStr = ''
+ replyAvatarImageInPost = ''
+
+ if not postJsonObject['object'].get('inReplyTo'):
+ return (titleStr, replyAvatarImageInPost,
+ containerClassIcons, containerClass)
+
+ containerClassIcons = 'containericons darker'
+ containerClass = 'container darker'
+ if postJsonObject['object']['inReplyTo'].startswith(postActor):
+ titleStr += replyToYourselfHtml(translate, iconsPath)
+ return (titleStr, replyAvatarImageInPost,
+ containerClassIcons, containerClass)
+
+ if '/statuses/' in postJsonObject['object']['inReplyTo']:
+ inReplyTo = postJsonObject['object']['inReplyTo']
+ replyActor = inReplyTo.split('/statuses/')[0]
+ replyNickname = getNicknameFromActor(replyActor)
+ if replyNickname:
+ replyDomain, replyPort = \
+ getDomainFromActor(replyActor)
+ if replyNickname and replyDomain:
+ getPersonFromCache(baseDir, replyActor,
+ personCache,
+ allowDownloads)
+ replyDisplayName = \
+ getDisplayName(baseDir, replyActor,
+ personCache)
+ if replyDisplayName:
+ if ':' in replyDisplayName:
+ # benchmark 13.5
+ if enableTimingLog:
+ timeDiff = \
+ int((time.time() -
+ postStartTime) * 1000)
+ if timeDiff > 100:
+ print('TIMING INDIV ' +
+ boxName + ' 13.5 = ' +
+ str(timeDiff))
+ repDisp = replyDisplayName
+ replyDisplayName = \
+ addEmojiToDisplayName(baseDir,
+ httpPrefix,
+ nickname,
+ domain,
+ repDisp,
+ False)
+ # benchmark 13.6
+ if enableTimingLog:
+ timeDiff = \
+ int((time.time() -
+ postStartTime) * 1000)
+ if timeDiff > 100:
+ print('TIMING INDIV ' +
+ boxName + ' 13.6 = ' +
+ str(timeDiff))
+ titleStr += \
+ ' ' + \
+ '
\n' + \
+ ' ' + \
+ '' + \
+ replyDisplayName + '\n'
+
+ # benchmark 13.7
+ if enableTimingLog:
+ timeDiff = int((time.time() -
+ postStartTime) * 1000)
+ if timeDiff > 100:
+ print('TIMING INDIV ' + boxName +
+ ' 13.7 = ' + str(timeDiff))
+
+ # show avatar of person replied to
+ replyAvatarUrl = \
+ getPersonAvatarUrl(baseDir,
+ replyActor,
+ personCache,
+ allowDownloads)
+
+ # benchmark 13.8
+ if enableTimingLog:
+ timeDiff = int((time.time() -
+ postStartTime) * 1000)
+ if timeDiff > 100:
+ print('TIMING INDIV ' + boxName +
+ ' 13.8 = ' + str(timeDiff))
+
+ if replyAvatarUrl:
+ replyAvatarImageInPost = \
+ '