perf(push): Only get user language when needed
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Родитель
c25f598709
Коммит
e4bd0dc554
|
@ -303,10 +303,10 @@ class Push {
|
|||
$this->printInfo('Trying to push to ' . count($devices) . ' devices');
|
||||
$this->printInfo('');
|
||||
|
||||
if (!$notification->isValidParsed()) {
|
||||
$language = $this->l10nFactory->getUserLanguage($user);
|
||||
$this->printInfo('Language is set to ' . $language);
|
||||
|
||||
if (!$notification->isValidParsed()) {
|
||||
try {
|
||||
$this->notificationManager->setPreparingPushNotification(true);
|
||||
$notification = $this->notificationManager->prepare($notification, $language);
|
||||
|
|
Загрузка…
Ссылка в новой задаче