mirror of
https://github.com/matrix-org/sliding-sync.git
synced 2025-03-10 13:37:11 +00:00
Ensure future message deletes clear ack pos
This commit is contained in:
parent
a2d8900268
commit
2798733377
@ -81,7 +81,12 @@ func (t *ToDeviceTable) DeleteMessagesUpToAndIncluding(userID, deviceID string,
|
||||
}
|
||||
|
||||
func (t *ToDeviceTable) DeleteAllMessagesForDevice(userID, deviceID string) error {
|
||||
// TODO: should these deletes take place in a transaction?
|
||||
_, err := t.db.Exec(`DELETE FROM syncv3_to_device_messages WHERE user_id = $1 AND device_id = $2`, userID, deviceID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = t.db.Exec(`DELETE FROM syncv3_to_device_ack_pos WHERE user_id = $1 AND device_id = $2`, userID, deviceID)
|
||||
return err
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user