fix(@dekstop/chat): mentioning oneself display the full key instead of username
Fixes #4897
This commit is contained in:
parent
895a0b5d47
commit
4ff700681f
|
@ -51,7 +51,7 @@ method isLoaded*(self: Module): bool =
|
||||||
method viewDidLoad*(self: Module) =
|
method viewDidLoad*(self: Module) =
|
||||||
# add me as the first user to the list
|
# add me as the first user to the list
|
||||||
let (admin, joined) = self.controller.getChatMemberInfo(singletonInstance.userProfile.getPubKey())
|
let (admin, joined) = self.controller.getChatMemberInfo(singletonInstance.userProfile.getPubKey())
|
||||||
let loggedInUserDisplayName = singletonInstance.userProfile.getName() & "(You)"
|
let loggedInUserDisplayName = singletonInstance.userProfile.getName() & " (You)"
|
||||||
self.view.model().addItem(initItem(
|
self.view.model().addItem(initItem(
|
||||||
singletonInstance.userProfile.getPubKey(),
|
singletonInstance.userProfile.getPubKey(),
|
||||||
loggedInUserDisplayName,
|
loggedInUserDisplayName,
|
||||||
|
|
|
@ -142,6 +142,11 @@ Rectangle {
|
||||||
property var mentionsPos: []
|
property var mentionsPos: []
|
||||||
|
|
||||||
function insertMention(aliasName, lastAtPosition, lastCursorPosition) {
|
function insertMention(aliasName, lastAtPosition, lastCursorPosition) {
|
||||||
|
let startInd = aliasName.indexOf("(");
|
||||||
|
if (startInd > 0){
|
||||||
|
aliasName = aliasName.substring(0, startInd-1)
|
||||||
|
}
|
||||||
|
|
||||||
const hasEmoji = StatusQUtils.Emoji.hasEmoji(messageInputField.text)
|
const hasEmoji = StatusQUtils.Emoji.hasEmoji(messageInputField.text)
|
||||||
const spanPlusAlias = `${Constants.mentionSpanTag}@${aliasName}</a></span> `;
|
const spanPlusAlias = `${Constants.mentionSpanTag}@${aliasName}</a></span> `;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue