diff options
author | Joas Schilling <coding@schilljs.com> | 2020-06-10 15:56:23 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-06-10 17:26:51 +0300 |
commit | 9f8e3e372d8816f8a68fbeba2c8b831238c58577 (patch) | |
tree | 2f4c8fd0ddff85d4967fa959764a6b3998deee83 /lib/Notification/Notifier.php | |
parent | c126b9c6f6e44bda486ccbaffc27411f6cbd765c (diff) |
Make label fixed value and handle unknown subject
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Notification/Notifier.php')
-rw-r--r-- | lib/Notification/Notifier.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Notification/Notifier.php b/lib/Notification/Notifier.php index 2a8f4787c..a62b3b128 100644 --- a/lib/Notification/Notifier.php +++ b/lib/Notification/Notifier.php @@ -659,7 +659,7 @@ class Notifier implements INotifier { protected function parseHostedSignalingServer(INotification $notification, IL10N $l): INotification { $action = $notification->createAction(); - $action->setLabel($l->t('Open settings')) + $action->setLabel('open_settings') ->setParsedLabel($l->t('Open settings')) ->setLink($notification->getLink(), IAction::TYPE_WEB) ->setPrimary(true); @@ -681,6 +681,8 @@ class Notifier implements INotifier { $subject ); break; + default: + throw new \InvalidArgumentException('Unknown subject'); } return $notification |