{if !empty($conversation)} {$_contact = [ 'id' => null, 'name' => '[`Deleted contact`]' ]} {if !empty($contacts[$conversation.contact_id])} {$_contact = $contacts[$conversation.contact_id]} {/if} {$filter_contact_id = waRequest::request('contact', waRequest::get('contact', null, waRequest::TYPE_INT), waRequest::TYPE_INT)} {$filter_deal_id = waRequest::request('deal', waRequest::get('deal', null, waRequest::TYPE_INT), waRequest::TYPE_INT)} {$_sender = $contacts[$wa->userId()]} {$page = waRequest::get('pt', null, waRequest::TYPE_INT)} {if $page && $page != 1}{$_page = "?page=`$page`"}{else}{$_page = ''}{/if} {$current_date = ''} {$old_message_id = $messages|reset} {function name="_renderChatTime" _date='' } {$message_date = waDateTime::format('date', $_date)} {$now = time()} {$your_date = strtotime($_date)} {$datediff = round(($now - $your_date) / (60 * 60 * 24))} {$now_year = waDateTime::date('Y', $now)} {$chat_date = substr($_date|wa_datetime:'humandatetime', 0, -5)} {$chat_date = str_replace($now_year, '', $chat_date)} {$week_day = date('N', $your_date)} {if $datediff > 1 && $datediff < 6} {$week_days = waDateTime::getWeekdayNames()} {$chat_date =$week_days[$week_day]} {/if} {if $current_date != $message_date}
{$chat_date}
{/if} {/function} {function name="_renderFromContact" _contact=[]} {$_contact.name|escape} {/function} {function name="_renderRecipient" _contact=[]} {if !empty($_contact.name)} {if !empty($_contact.contact_id)} {if !empty($_contact.photo)}{/if} {$_contact.name|escape} {else} {$_contact.name|escape} {/if} {/if} {if !empty($_contact.destination)} <{$_contact.destination|escape}> {elseif !empty($_contact.email)} <{$_contact.email|escape}> {/if} {/function} {function _renderMessageBody message=[]}
{include file="../message/MessageBody.inc.html" message=$message inline}
{/function} {function skeleton}
{/function}
{skeleton}
{strip}
{if !empty($_contact.id)} {$_photo = $_contact->getPhoto(50)} {*$_jobtitle = $_contact->get('jobtitle')*} {*$_company = $_contact->get('company')*} {* CLIENT PHOTO *} {if !empty($_photo)}
{$_contact.name|escape}
{/if} {else}
{/if}
{$_contact.name|escape}
{if !empty($conversation.icon_fab)} {elseif !empty($conversation.icon_fa)} {else} {/if}
{$conversation.transport_name|escape}
{$conversation.summary_html}
{/strip} {$current_user_id = $wa->userId()} {if $conversation.type == 'EMAIL'} {if $source_is_disabled}
[`Oops, sorry, this message source is disabled :(`]
{elseif $conversation.contact_id && !empty($contacts[$conversation.contact_id])} {if !empty($conversation.aux_items.reply_form_ai_answer)} {$conversation.aux_items.reply_form_ai_answer.content} {/if}
{include file="./MessageConversationId.replyEmail.inc.html" _c_icon_url=$conversation.icon_url _c_icon = $conversation.icon_fa inline}
{/if} {elseif $conversation.type == 'IM'} {if $source_is_disabled}
[`Oops, sorry, this messenger is disabled :(`]
{elseif $conversation.contact_id && !empty($contacts[$conversation.contact_id])} {if !empty($conversation.aux_items.reply_form_ai_answer)} {$conversation.aux_items.reply_form_ai_answer.content} {/if}
{* RENDER OVERLOADED REPLY FORM *} {$is_images_enabled = $conversation.features.images} {$is_files_enabled = $conversation.features.attachments} {*if empty($conversation.reply_form_html)} {$conversation.reply_form_html} *} {* RENDER DEFAULT REPLY FORM *} {if isset($conversation.source.id)}
{* Hidden fields *} {if ifset($conversation.features.html)} {/if}
{*
[`Attach file`]
*}
{if !empty($conversation.aux_items.reply_form_ai_answer)} {$conversation.aux_items.reply_form_ai_answer.button} {/if} {if !empty($conversation.aux_items.reply_form_dropdown_items)}
{/if}
{* ACTIONS *}
{* FILES *}
{capture assign="_file_template_html"}
{/capture}
{else}
[`Source not found`]
{/if}
{*
{if !empty($conversation.icon_fab)} {elseif !empty($conversation.icon_fa)} {else} {/if}
*}
{/if} {/if}
{elseif empty($is_empty_case)}
[`No messages`]
{/if} {if !$iframe && !empty($conversation)} {/if}