From 38e0c5fca6f7dc75a1aca76a1ea45cad21710e6b Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Tue, 26 Dec 2023 19:53:49 +0100 Subject: [PATCH] Partially fix replying to files --- pkg/signalmeow/sending.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/signalmeow/sending.go b/pkg/signalmeow/sending.go index e64446a0..0ca75b9f 100644 --- a/pkg/signalmeow/sending.go +++ b/pkg/signalmeow/sending.go @@ -463,13 +463,15 @@ func DataMessageForDelete(targetMessageTimestamp uint64) *SignalContent { } func AddQuoteToDataMessage(content *SignalContent, quotedMessageSender string, quotedMessageTimestamp uint64) { - // Note: We're supposed to send the quoted message content too as a fallback, - // but it only seems to be necessary to quote image messages on iOS and Desktop. - // Android seems to render every quote fine, and iOS and Desktop render text quotes fine. content.DataMessage.Quote = &signalpb.DataMessage_Quote{ AuthorAci: proto.String(quotedMessageSender), Id: proto.Uint64(quotedMessageTimestamp), Type: signalpb.DataMessage_Quote_NORMAL.Enum(), + + // This is a hack to make Signal iOS and desktop render replies to file messages. + // Unfortunately it also makes Signal Desktop show a file icon on replies to text messages. + // TODO store file or text flag in database and fill this field only when replying to file messages. + Attachments: []*signalpb.DataMessage_Quote_QuotedAttachment{{}}, } }