diff --git a/webapp_post.py b/webapp_post.py index 649f97d66..b6e7f5839 100644 --- a/webapp_post.py +++ b/webapp_post.py @@ -390,7 +390,11 @@ def _getReplyIconHtml(baseDir: str, nickname: str, domain: str, return replyStr # reply is permitted - create reply icon - replyToLink = removeIdEnding(postJsonObject['object']['id']) + if '#' not in postJsonObject['object']['id']: + replyToLink = removeIdEnding(postJsonObject['object']['id']) + else: + replyToLink = \ + removeIdEnding(postJsonObject['object']['id'].split('#')[0]) # see Mike MacGirvin's replyTo suggestion if postJsonObject['object'].get('replyTo'): @@ -639,7 +643,10 @@ def _getLikeIconHtml(nickname: str, domainFull: str, likeStr += '\n' - likePostId = removeIdEnding(postJsonObject['id']) + if '#' not in postJsonObject['id']: + likePostId = removeIdEnding(postJsonObject['id']) + else: + likePostId = removeIdEnding(postJsonObject['id'].split('#')[0]) likeStr += \ '