diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-05-28 12:16:37 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2018-07-02 15:16:36 +0300 |
commit | e03e25a6e4164714a6dac8924b998a9b635710fc (patch) | |
tree | 489cb8e513e830c5bea776fa7355e8cfdd1bbe8b /lib | |
parent | a3d06b12999fa85b5956c30e451755f31d1a7478 (diff) |
Make sure force_lang is used and the correct default
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Push.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Push.php b/lib/Push.php index cbac776..0c55aa0 100644 --- a/lib/Push.php +++ b/lib/Push.php @@ -80,7 +80,9 @@ class Push { return; } - $language = $this->config->getUserValue($notification->getUser(), 'core', 'lang', 'en'); + $language = $this->config->getSystemValue('force_language', false); + $language = \is_string($language) ? $language : $this->config->getUserValue($notification->getUser(), 'core', 'lang', null); + $language = $language ?? $this->config->getSystemValue('default_language', 'en'); try { $notification = $this->notificationManager->prepare($notification, $language); } catch (\InvalidArgumentException $e) { |