Skip to content

Commit

Permalink
fix(bridge): fix bridge replies not working when they come from Discord
Browse files Browse the repository at this point in the history
Fixes status-im/status-desktop#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.
  • Loading branch information
jrainville committed Sep 12, 2024
1 parent 13ab5b6 commit 1c5288b
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions protocol/message_persistence.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1c5288b

Please sign in to comment.