Added emoji reaction retraction persistence
This commit is contained in:
parent
106ccfcf0f
commit
0a26d5a37d
|
@ -804,3 +804,8 @@ func (db sqlitePersistence) EmojiReactionByID(id string) (*EmojiReaction, error)
|
|||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
func (db sqlitePersistence) RetractEmojiReaction(id string) error {
|
||||
_, err := db.db.Exec(`UPDATE emoji_reactions SET retracted = 1 WHERE id = ?`, id)
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -3331,8 +3331,12 @@ func (m *Messenger) SendEmojiReactionRetraction(ctx context.Context, emojiReacti
|
|||
response := MessengerResponse{}
|
||||
emojiReaction.Retracted = true
|
||||
response.EmojiReactions = []*EmojiReaction{emojiReaction}
|
||||
response.Chats = []*Chat{chat}
|
||||
|
||||
// TODO update the retraction in the db
|
||||
err = m.persistence.RetractEmojiReaction(emojiReactionID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &response, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue