From 2d46ad893eed9b8c2c11909998c591db5122948c Mon Sep 17 00:00:00 2001 From: Remigijus Kiminas Date: Fri, 14 Oct 2022 08:02:59 -0400 Subject: [PATCH] Bot intro message should be translated based on passed department --- lhc_web/modules/lhwidgetrestapi/getinvitation.php | 4 +++- lhc_web/modules/lhwidgetrestapi/onlinesettings.php | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lhc_web/modules/lhwidgetrestapi/getinvitation.php b/lhc_web/modules/lhwidgetrestapi/getinvitation.php index 2251b6c2ba..df0bd26c7d 100644 --- a/lhc_web/modules/lhwidgetrestapi/getinvitation.php +++ b/lhc_web/modules/lhwidgetrestapi/getinvitation.php @@ -123,7 +123,9 @@ $chat->gbot_id = $bot->id; $chat->additional_data_array = $onlineUser->online_attr_array; $chat->chat_variables_array = $onlineUser->chat_variables_array; - + if ($onlineUser->dep_id > 0) { + $chat->dep_id = $onlineUser->dep_id; + } $tpl->set('chat',$chat); $tpl->set('react',true); $tpl->set('no_wrap_intro',true); diff --git a/lhc_web/modules/lhwidgetrestapi/onlinesettings.php b/lhc_web/modules/lhwidgetrestapi/onlinesettings.php index 8d4d197774..7cec777c46 100644 --- a/lhc_web/modules/lhwidgetrestapi/onlinesettings.php +++ b/lhc_web/modules/lhwidgetrestapi/onlinesettings.php @@ -737,6 +737,9 @@ function renderMessage($paramsRender, $theme) { $chat->gbot_id = $bot->id; $chat->additional_data_array = $onlineUser->online_attr_array; $chat->chat_variables_array = $onlineUser->chat_variables_array; + if ($onlineUser->dep_id > 0) { + $chat->dep_id = $onlineUser->dep_id; + } $tpl->set('chat',$chat); } }