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

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/41447/head
Joas Schilling 2 years ago
parent 6284009fa0
commit d1f3ab030b
No known key found for this signature in database
GPG Key ID: 74434EFE0D2E2205
  1. 4
      apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php

@ -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);
}
}

Loading…
Cancel
Save