Skip to content

Commit

Permalink
fix(StatusChatInput): return correct mention suggestions
Browse files Browse the repository at this point in the history
- follow the order of properties that `ProfileUtils.displayName()` uses
elsewhere in the application
- prefer nickname or ensName over displayName if the user has them

Fixes: #8691
  • Loading branch information
caybro committed Jan 9, 2023
1 parent 785110b commit db97fbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/imports/shared/status/StatusChatInput.qml
Original file line number Diff line number Diff line change
Expand Up @@ -990,11 +990,11 @@ Rectangle {
width: messageInput.width
filter: messageInputField.text
cursorPosition: messageInputField.cursorPosition
property: ["name", "nickname", "ensName", "alias"]
property: ["nickname", "ensName", "name", "alias"]
inputField: messageInputField
onItemSelected: function (item, lastAtPosition, lastCursorPosition) {
messageInputField.forceActiveFocus();
let name = item.name.replace("@", "")
const name = item[suggestionsBox.property.find(p => !!item[p])].replace("@", "")
d.insertMention(name, item.publicKey, lastAtPosition, lastCursorPosition)
suggestionsBox.suggestionsModel.clear()
}
Expand Down

0 comments on commit db97fbf

Please sign in to comment.