Skip to content

Commit 7d507d2

Browse files
authored
Merge pull request #41451 from nextcloud/backport/41447/stable27
[stable27] fix(backupcodes): Remove old notifications before creating a new remi…
2 parents bb7a704 + c267f36 commit 7d507d2

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)