getFirstUserMessage() 공개 정적인 메소드

Get first user mesasge for prefilling chat
public static getFirstUserMessage ( $chat_id )
$inputData->accept_tos = false;
$inputData->question = '';
$inputData->operator = (int) $Params['user_parameters_unordered']['operator'];
// Perhaps user was redirected to leave a message form because chat was not acceptend in some time interval
if ((string) $Params['user_parameters_unordered']['chatprefill'] != '') {
    list($chatID, $hash) = explode('_', $Params['user_parameters_unordered']['chatprefill']);
    try {
        $chatPrefill = erLhcoreClassModelChat::fetch($chatID);
        if ($chatPrefill->hash == $hash) {
            $inputData->chatprefill = $Params['user_parameters_unordered']['chatprefill'];
            $inputData->username = $chatPrefill->nick;
            $inputData->departament_id = $chatPrefill->dep_id;
            $inputData->email = $chatPrefill->email;
            $inputData->phone = $chatPrefill->phone;
            $inputData->accept_tos = true;
            $inputData->question = erLhcoreClassChat::getFirstUserMessage($chatPrefill->id);
        } else {
            unset($chatPrefill);
        }
    } catch (Exception $e) {
        // Do nothing
    }
}
$inputData->username = isset($_GET['prefill']['username']) ? (string) $_GET['prefill']['username'] : $inputData->username;
$inputData->hash_resume = false;
$inputData->vid = false;
$inputData->question = isset($_GET['prefill']['question']) ? (string) $_GET['prefill']['question'] : $inputData->question;
$inputData->email = isset($_GET['prefill']['email']) ? (string) $_GET['prefill']['email'] : $inputData->email;
$inputData->phone = isset($_GET['prefill']['phone']) ? (string) $_GET['prefill']['phone'] : $inputData->phone;
$inputData->validate_start_chat = false;
$inputData->name_items = array();