diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 43238b34fd..e690932f33 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -89,7 +89,6 @@ public function register(IRegistrationContext $context): void { // TwofactorGateway listener $context->registerEventListener(SendSignNotificationEvent::class, TwofactorGatewayListener::class); - $context->registerEventListener(SignedEvent::class, TwofactorGatewayListener::class); $context->registerEventListener(UserDeletedEvent::class, UserDeletedListener::class); diff --git a/lib/Listener/TwofactorGatewayListener.php b/lib/Listener/TwofactorGatewayListener.php index 8ae6162d2d..7a87fe9a30 100644 --- a/lib/Listener/TwofactorGatewayListener.php +++ b/lib/Listener/TwofactorGatewayListener.php @@ -101,7 +101,12 @@ protected function sendSignNotification( $gatewayName = $this->getGatewayName($entity->getIdentifierKey()); $gateway = $gatewayFactory->get($gatewayName); try { - $gateway->send($identifier, $message); + $gateway->send($identifier, $message, [ + 'body_parameters' => [ + $link, + $libreSignFile->getName(), + ], + ]); } catch (Exception $e) { $this->logger->error('Could not send 2FA message', [ 'identifier' => $identifier,