mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 07:28:27 +00:00
Use database writer in user API DeleteOldNotifications
This commit is contained in:
parent
64472d9aab
commit
34e1dc210b
1 changed files with 3 additions and 1 deletions
|
@ -735,7 +735,9 @@ func (d *Database) GetRoomNotificationCounts(ctx context.Context, localpart, roo
|
|||
}
|
||||
|
||||
func (d *Database) DeleteOldNotifications(ctx context.Context) error {
|
||||
return d.Notifications.Clean(ctx, nil)
|
||||
return d.Writer.Do(d.DB, nil, func(txn *sql.Tx) error {
|
||||
return d.Notifications.Clean(ctx, txn)
|
||||
})
|
||||
}
|
||||
|
||||
func (d *Database) UpsertPusher(
|
||||
|
|
Loading…
Reference in a new issue