Icons for dm and reply

merge-requests/30/head
Bob Mottram 2021-03-18 19:43:10 +00:00
parent aa7c78d2f1
commit dca5e095ba
1 changed files with 5 additions and 0 deletions

View File

@ -14,6 +14,7 @@ import select
import webbrowser import webbrowser
import urllib.parse import urllib.parse
from random import randint from random import randint
from utils import isDM
from utils import loadTranslationsFromFile from utils import loadTranslationsFromFile
from utils import removeHtml from utils import removeHtml
from utils import getNicknameFromActor from utils import getNicknameFromActor
@ -505,6 +506,10 @@ def _desktopShowBoxJson(boxName: str, boxJson: {},
posStr += ' ' posStr += ' '
authorActor = postJsonObject['object']['attributedTo'] authorActor = postJsonObject['object']['attributedTo']
name = getNicknameFromActor(authorActor) name = getNicknameFromActor(authorActor)
if isDM(postJsonObject):
name += '📧' + name
if postJsonObject['object'].get('inReplyTo'):
name += '' + name
if len(name) > 16: if len(name) > 16:
name = name[:16] name = name[:16]
else: else: