Merge pull request #41452 from nextcloud/backport/41447/stable26

[stable26] fix(backupcodes): Remove old notifications before creating a new remi…
This commit is contained in:
Joas Schilling 2023-11-14 12:38:44 +01:00 committed by GitHub
commit 009375b7ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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