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:
parent
edc94c9d8d
commit
1cc1b8a1b7
|
@ -709,12 +709,12 @@ proc renderInline(self: Service, parsedText: ParsedText, communityChats: seq[Cha
|
||||||
if pair[1] == "@" & id:
|
if pair[1] == "@" & id:
|
||||||
tag = pair[0]
|
tag = pair[0]
|
||||||
break
|
break
|
||||||
result = fmt("<a href=\"\" class=\"mention\">{tag}</a>")
|
result = fmt("<a href=\"#\" class=\"mention\">{tag}</a>")
|
||||||
else:
|
else:
|
||||||
if isCompressedPubKey(id):
|
if isCompressedPubKey(id):
|
||||||
id = status_accounts.decompressPk(id).result
|
id = status_accounts.decompressPk(id).result
|
||||||
let contactDto = self.contactService.getContactById(id)
|
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:
|
of PARSED_TEXT_CHILD_TYPE_STATUS_TAG:
|
||||||
result = fmt("<span>#{value}</span>")
|
result = fmt("<span>#{value}</span>")
|
||||||
for chat in communityChats:
|
for chat in communityChats:
|
||||||
|
|
Loading…
Reference in New Issue