Don't erase existing reply-to relationships when editing messages

Signed-off-by: Joshua Goins <josh@redstrate.com>
This commit is contained in:
Joshua Goins
2023-01-04 23:36:30 -05:00
parent f03cd3f4c6
commit 1bf23c491a
5 changed files with 32 additions and 3 deletions

View File

@@ -129,6 +129,9 @@ QQC2.ToolBar {
} else if (event.key === Qt.Key_Up && inputField.text.length === 0) {
let editEvent = messageEventModel.getLastLocalUserMessageEventId()
if (editEvent) {
if(editEvent["m.relates_to"]) {
currentRoom.chatBoxReplyId = editEvent["m.relates_to"]["m.in_reply_to"]["event_id"];
}
currentRoom.chatBoxEditId = editEvent["event_id"]
}
} else if (event.key === Qt.Key_Up && completionMenu.visible) {