From 67b7821fae2be850defd1aaff5022325c0fe2546 Mon Sep 17 00:00:00 2001 From: miruka Date: Mon, 20 Jul 2020 23:17:51 -0400 Subject: [PATCH] Ctrl+C, non-E2E media: copy HTTP URL, not filename --- src/gui/Pages/Chat/Timeline/EventList.qml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/gui/Pages/Chat/Timeline/EventList.qml b/src/gui/Pages/Chat/Timeline/EventList.qml index 3d7a861c..f135327c 100644 --- a/src/gui/Pages/Chat/Timeline/EventList.qml +++ b/src/gui/Pages/Chat/Timeline/EventList.qml @@ -232,8 +232,13 @@ Rectangle { const source = JSON.parse(model.source) Clipboard.text = + model.media_http_url && + utils.isEmptyObject(JSON.parse(model.media_crypt_dict)) ? + model.media_http_url : + "body" in source ? source.body : + utils.stripHtmlTags(utils.processedEventText(model)) return @@ -245,8 +250,13 @@ Rectangle { const source = JSON.parse(model.source) contents.push( + model.media_http_url && + utils.isEmptyObject(JSON.parse(model.media_crypt_dict)) ? + model.media_http_url : + "body" in source ? source.body : + utils.stripHtmlTags(utils.processedEventText(model)) ) }