From 51feb20be53dc28c90ed43c46f8c236719fa39ad Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Thu, 12 Sep 2024 18:02:22 -0400 Subject: [PATCH] fix(bridge): fix bridge replies not working when they come from Discord Fixes https://github.com/status-im/status-desktop/issues/16323 The problem was that the code expected to receive the Discord message ID, but the bridge is smart enough to return the Status message ID already, so there is no need to try and convert it. There were also a couple issues in the bridge code itself. --- protocol/message_persistence.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/protocol/message_persistence.go b/protocol/message_persistence.go index f482ac6494..4d6fcc00ee 100644 --- a/protocol/message_persistence.go +++ b/protocol/message_persistence.go @@ -3075,15 +3075,7 @@ func (db sqlitePersistence) findAndUpdateReplies(tx *sql.Tx, bridgeMessageID str } func (db sqlitePersistence) findAndUpdateRepliedTo(tx *sql.Tx, discordParentMessageID string, statusMessageID string) error { - // Finds status messages id which are replies for bridgeMessageID - repliedMessageID, err := db.findStatusMessageIDForBridgeMessageID(tx, discordParentMessageID) - if err != nil { - return err - } - if repliedMessageID == "" { - return nil - } - return db.updateStatusMessagesWithResponse(tx, []string{statusMessageID}, repliedMessageID) + return db.updateStatusMessagesWithResponse(tx, []string{statusMessageID}, discordParentMessageID) } func (db sqlitePersistence) GetCommunityMemberAllMessages(member string, communityID string) ([]*common.Message, error) {