fix: '@everyone' in the pinned messages leads to 'qrc:/app/mainui/1'

- make the `href` point to `#` to prevent Qt from resolving the empty URL
as if it were a relative link
- prepend the at sign (`@`) to the mention tag, just like Discord and
`@everyone` else :)

Fixes #9364
This commit is contained in:
Lukáš Tinkl 2023-02-01 12:58:18 +01:00 committed by Alexandra Betouni
parent edc94c9d8d
commit 1cc1b8a1b7
1 changed files with 2 additions and 2 deletions

View File

@ -709,12 +709,12 @@ proc renderInline(self: Service, parsedText: ParsedText, communityChats: seq[Cha
if pair[1] == "@" & id:
tag = pair[0]
break
result = fmt("<a href=\"\" class=\"mention\">{tag}</a>")
result = fmt("<a href=\"#\" class=\"mention\">{tag}</a>")
else:
if isCompressedPubKey(id):
id = status_accounts.decompressPk(id).result
let contactDto = self.contactService.getContactById(id)
result = fmt("<a href=\"//{id}\" class=\"mention\">{contactDto.userDefaultDisplayName()}</a>")
result = fmt("<a href=\"//{id}\" class=\"mention\">@{contactDto.userDefaultDisplayName()}</a>")
of PARSED_TEXT_CHILD_TYPE_STATUS_TAG:
result = fmt("<span>#{value}</span>")
for chat in communityChats: