fix(backupcodes): Remove old notifications before creating a new reminder

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2023-11-14 08:49:17 +01:00
parent 6284009fa0
commit d1f3ab030b
No known key found for this signature in database
GPG key ID: 74434EFE0D2E2205

View file

@ -94,9 +94,11 @@ class RememberBackupCodesJob extends TimedJob {
$notification = $this->notificationManager->createNotification();
$notification->setApp('twofactor_backupcodes')
->setUser($user->getUID())
->setDateTime($date)
->setObject('create', 'codes')
->setSubject('create_backupcodes');
$this->notificationManager->markProcessed($notification);
$notification->setDateTime($date);
$this->notificationManager->notify($notification);
}
}