Skip to content

Commit

Permalink
Merge pull request #41447 from nextcloud/bugfix/noid/dont-spam-users-…
Browse files Browse the repository at this point in the history
…with-reminders

fix(backupcodes): Remove old notifications before creating a new remi…
  • Loading branch information
nickvergessen committed Nov 14, 2023
2 parents bb82119 + d1f3ab0 commit be76f0d
Showing 1 changed file with 3 additions and 1 deletion.
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 be76f0d

Please sign in to comment.