From bb8df28378975de964c654230a9f38b997391647 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 18 Aug 2019 20:13:24 +0100 Subject: [PATCH] Shorter domain --- webinterface.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webinterface.py b/webinterface.py index 264340e5..a5e35cc1 100644 --- a/webinterface.py +++ b/webinterface.py @@ -996,7 +996,10 @@ def individualPostAsHtml(baseDir: str, \ if replyNickname and replyDomain: titleStr+=' replying to @'+replyNickname+'@'+replyDomain+'' else: - titleStr+=' replying to '+postJsonObject['object']['inReplyTo']+'' + postDomain=postJsonObject['object']['inReplyTo'].replace('https://','').replace('http://','').replace('dat://','') + if '/' in postDomain: + postDomain=postDomain.split('/',1)[0] + titleStr+=' replying to '+postDomain+'' attachmentStr='' if postJsonObject['object']['attachment']: if isinstance(postJsonObject['object']['attachment'], list):