message Service added

This commit is contained in:
amazuecos
2025-02-16 08:10:07 +00:00
parent 4364bc3c07
commit 47fa27402f
4 changed files with 15 additions and 3 deletions

View File

@ -36,7 +36,8 @@ class MessageService extends BaseService
}
public function createErrorMessagePresupuesto(string $error, int $presupuesto_id)
{
$chat_department_name = $this->configVariables->getVariable('send_error_to_chat_department_name');
$dataResponse = null;
$chat_department_name = $this->configVariables->getVariable('send_error_to_chat_department_name')?->value;
$chat_department_id = $this->chatDepartmentModel->where('name', $chat_department_name)->first()?->id;
if ($chat_department_id) {
$existChat = $this->chatModel->existChatPresupuesto($chat_department_id, $presupuesto_id);
@ -55,5 +56,7 @@ class MessageService extends BaseService
}
}
}
return $dataResponse;
}
}