From a386ecec8c75677942f489e9e94ddcca6a29a05e Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 12 Apr 2019 13:44:23 +0200 Subject: Update twofactor_backupcodes Notifier Signed-off-by: Joas Schilling --- .../lib/Notifications/Notifier.php | 23 ++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'apps/twofactor_backupcodes/lib/Notifications') diff --git a/apps/twofactor_backupcodes/lib/Notifications/Notifier.php b/apps/twofactor_backupcodes/lib/Notifications/Notifier.php index df92c7a9e01..5e53a32df77 100644 --- a/apps/twofactor_backupcodes/lib/Notifications/Notifier.php +++ b/apps/twofactor_backupcodes/lib/Notifications/Notifier.php @@ -42,7 +42,27 @@ class Notifier implements INotifier { $this->url = $url; } - public function prepare(INotification $notification, $languageCode) { + /** + * Identifier of the notifier, only use [a-z0-9_] + * + * @return string + * @since 17.0.0 + */ + public function getID(): string { + return 'twofactor_backupcodes'; + } + + /** + * Human readable name describing the notifier + * + * @return string + * @since 17.0.0 + */ + public function getName(): string { + return $this->factory->get('twofactor_backupcodes')->t('Second-factor backup codes'); + } + + public function prepare(INotification $notification, string $languageCode): INotification { if ($notification->getApp() !== 'twofactor_backupcodes') { // Not my app => throw throw new \InvalidArgumentException(); @@ -67,5 +87,4 @@ class Notifier implements INotifier { throw new \InvalidArgumentException(); } } - } -- cgit v1.2.3