Skip to content

Commit

Permalink
fix(backupcodes): Remove old notifications before creating a new remi…
Browse files Browse the repository at this point in the history
…nder

Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen authored and backportbot-nextcloud[bot] committed Nov 14, 2023
1 parent 4b19cda commit 0898eb3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,11 @@ protected function run($argument) {
$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);
}
}

0 comments on commit 0898eb3

Please sign in to comment.