{{-- resources/views/messenger/conversation.blade.php --}} محادثة مع {{ $conversation->getParticipantDisplayName() }}
{{ $conversation->getParticipantDisplayName() }}

{{ $conversation->getParticipantDisplayName() }} @if($conversation->is_verified ?? false) @endif

{{ $conversation->facebookPage->name }}
نشط الآن
{{ $conversation->messages->count() }} رسالة
@foreach($conversation->messages as $message)
@if(!$message->isFromPage()) {{ $conversation->getParticipantDisplayName() }} @endif
@if($message->message)
{!! nl2br(e($message->message)) !!}
@endif @if($message->attachments)
@foreach($message->attachments as $attachment)
@if(str_contains($attachment['type'] ?? '', 'image'))
صورة
@elseif(str_contains($attachment['type'] ?? '', 'video')) @else {{ $attachment['filename'] ?? 'ملف مرفق' }} @endif
@endforeach
@endif @if($message->quick_replies)
ردود سريعة:
@foreach($message->quick_replies as $reply) {{ $reply['title'] }} @endforeach
@endif
{{ $message->sent_at->format('H:i') }} @if($message->isFromPage())
تم الإرسال
@endif
@if($message->isFromPage())
@endif
@endforeach
{{ $conversation->messages->count() }} رسالة • آخر نشاط {{ $conversation->updated_at->diffForHumans() }}
@csrf
{{ $conversation->getParticipantDisplayName() }}

{{ $conversation->getParticipantDisplayName() }}

معرف: {{ Str::limit($conversation->participant_id, 15) }}

{{ $conversation->messages->count() }}
رسالة
{{ $conversation->messages->where('sender_type', 'user')->count() }}
واردة
{{ $conversation->last_message_time?->diffInDays(now()) ?? 0 }}
يوم

قوالب سريعة

@php $templates = [ ['title' => 'ترحيب', 'message' => 'مرحباً! شكراً لتواصلك معنا. كيف يمكنني مساعدتك اليوم؟', 'color' => 'blue'], ['title' => 'طلب صبر', 'message' => 'شكراً لصبرك. سأقوم بمراجعة طلبك والرد عليك في أقرب وقت ممكن.', 'color' => 'orange'], ['title' => 'استفسار', 'message' => 'هل تحتاج لأي مساعدة إضافية؟', 'color' => 'green'], ['title' => 'إنهاء', 'message' => 'تم حل مشكلتك بنجاح! شكراً لتواصلك معنا.', 'color' => 'purple'], ]; @endphp @foreach($templates as $template) @endforeach

محادثات أخرى

عرض الكل
@php $otherConversations = App\Models\FacebookConversation::where('user_id', auth()->id()) ->where('id', '!=', $conversation->id) ->where('status', 'active') ->with(['latestMessage', 'facebookPage']) ->orderByDesc('last_message_time') ->limit(8) ->get(); @endphp @forelse($otherConversations as $otherConv)
{{ $otherConv->getParticipantDisplayName() }} @if($otherConv->has_unread)
{{ $otherConv->unread_count > 9 ? '9+' : $otherConv->unread_count }}
@endif
{{ $otherConv->getParticipantDisplayName() }}
{{ $otherConv->last_message_time ? $otherConv->last_message_time->format('H:i') : '' }}
{{ $otherConv->facebookPage->name }}
@if($otherConv->latestMessage)

@if($otherConv->latestMessage->isFromPage()) أنت: @endif {{ $otherConv->latestMessage->getDisplayMessage() }}

@else

لا توجد رسائل

@endif
@empty

لا توجد محادثات أخرى

@endforelse