From ff8fd01eb16389fcc527162f4cecacb4ba14383c Mon Sep 17 00:00:00 2001 From: miruka Date: Fri, 27 Mar 2020 05:38:08 -0400 Subject: [PATCH] Fix copying selected non-message events --- src/gui/Pages/Chat/Timeline/EventList.qml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gui/Pages/Chat/Timeline/EventList.qml b/src/gui/Pages/Chat/Timeline/EventList.qml index 499c58a1..3eb1074a 100644 --- a/src/gui/Pages/Chat/Timeline/EventList.qml +++ b/src/gui/Pages/Chat/Timeline/EventList.qml @@ -145,7 +145,13 @@ Rectangle { const contents = [] for (const model of eventList.getSortedChecked()) { - contents.push(JSON.parse(model.source).body) + const source = JSON.parse(model.source) + + contents.push( + "body" in source ? + source.body : + utils.stripHtmlTags(utils.processedEventText(model)) + ) } Clipboard.text = contents.join("\n\n")