Skip to content

Commit 0898eb3

Browse files
fix(backupcodes): Remove old notifications before creating a new reminder
Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent 4b19cda commit 0898eb3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,11 @@ protected function run($argument) {
9494
$notification = $this->notificationManager->createNotification();
9595
$notification->setApp('twofactor_backupcodes')
9696
->setUser($user->getUID())
97-
->setDateTime($date)
9897
->setObject('create', 'codes')
9998
->setSubject('create_backupcodes');
99+
$this->notificationManager->markProcessed($notification);
100+
101+
$notification->setDateTime($date);
100102
$this->notificationManager->notify($notification);
101103
}
102104
}

0 commit comments

Comments
 (0)