From c2a3940e41b7bb838359440b0a78512b8118701b Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 15 Apr 2022 20:44:14 +0300 Subject: [PATCH] Allow copying any type of message. Fixes #276 --- ui/room-view.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ui/room-view.go b/ui/room-view.go index bbe2465..7fc53f8 100644 --- a/ui/room-view.go +++ b/ui/room-view.go @@ -212,10 +212,7 @@ func (view *RoomView) OnSelect(message *messages.UIMessage) { go view.Download(msg.URL, msg.File, path, view.selectReason == SelectOpen) } case SelectCopy: - msg, ok := message.Renderer.(*messages.TextMessage) - if ok { - go view.CopyToClipboard(msg.PlainText(), view.selectContent) - } + go view.CopyToClipboard(message.Renderer.PlainText(), view.selectContent) } view.selecting = false view.selectContent = ""