fix(message_persistence): set from in quoted message even when deleted (#4354)
Needed for https://github.com/status-im/status-desktop/issues/12785
This commit is contained in:
parent
5cd20ded4e
commit
b7acde0910
|
@ -365,6 +365,7 @@ func (db sqlitePersistence) tableUserMessagesScanAllFields(row scanner, message
|
|||
if quotedDeleted.Bool || quotedDeletedForMe.Bool {
|
||||
message.QuotedMessage = &common.QuotedMessage{
|
||||
ID: quotedID.String,
|
||||
From: quotedFrom.String,
|
||||
Deleted: quotedDeleted.Bool,
|
||||
DeletedForMe: quotedDeletedForMe.Bool,
|
||||
}
|
||||
|
|
|
@ -557,9 +557,9 @@ func TestMessageReplies(t *testing.T) {
|
|||
require.Equal(t, "", retrievedMessages[4].ResponseTo)
|
||||
require.Nil(t, retrievedMessages[4].QuotedMessage)
|
||||
|
||||
// We have a ResponseTo, but no QuotedMessage only gives the ID and Deleted
|
||||
// We have a ResponseTo, but no QuotedMessage only gives the ID, From, and Deleted
|
||||
require.Equal(t, "id-4", retrievedMessages[0].ResponseTo)
|
||||
require.Equal(t, &common.QuotedMessage{ID: "id-4", Deleted: true}, retrievedMessages[0].QuotedMessage)
|
||||
require.Equal(t, &common.QuotedMessage{ID: "id-4", Deleted: true, From: "2"}, retrievedMessages[0].QuotedMessage)
|
||||
}
|
||||
|
||||
func TestMessageByChatIDWithTheSameClocks(t *testing.T) {
|
||||
|
|
Loading…
Reference in New Issue