fix(edit): fix edit message not sending mentions correctly

Fixes #10074
This commit is contained in:
Jonathan Rainville 2023-03-29 14:50:00 -04:00
parent 14c264e350
commit 0424715810
2 changed files with 11 additions and 7 deletions

View File

@ -59,7 +59,15 @@ Item {
size: StatusBaseButton.Size.Small
enabled: !!chatInputLoader.item && chatInputLoader.item.messageText.trim().length > 0
onClicked: {
editCompleted(!chatInputLoader.item ? "" : chatInputLoader.item.messageText)
let text = ""
if (chatInputLoader.item) {
if (chatInputLoader.item.getTextWithPublicKeys) {
text = chatInputLoader.item.getTextWithPublicKeys()
} else {
text = chatInputLoader.item.messageText
}
}
editCompleted(text)
}
}
}

View File

@ -479,9 +479,7 @@ Loader {
delegate.editCancelledHandler()
}
onEditCompleted: {
delegate.editCompletedHandler(newMsgText)
}
onEditCompleted: delegate.editCompletedHandler(newMsgText)
onImageClicked: {
switch (mouse.button) {
@ -679,9 +677,7 @@ Loader {
chatType: root.messageStore.chatType
isEdit: true
onSendMessage: {
delegate.editCompletedHandler(editTextInput.textInput.text)
}
onSendMessage: delegate.editCompletedHandler(editTextInput.getTextWithPublicKeys())
Component.onCompleted: {
parseMessage(root.messageText);