{{ $isMine ? 'Anda' : ($item->user?->chatLabel() ?? 'Anggota') }}
@if (data_get($item->meta, 'edited_at'))
Diedit
@endif
@if ($isMine)
@endif
{{ $item->body }}
@php($messageAttachments = collect(data_get($item->meta, 'attachments', []))->filter(fn ($attachment) => filled(data_get($attachment, 'url')))) @if ($messageAttachments->isNotEmpty())
@foreach ($messageAttachments as $attachment)
@php($attachmentType = data_get($attachment, 'type', 'document'))
@if ($attachmentType === 'image')
{{ data_get($attachment, 'name', 'Gambar') }}
@elseif ($attachmentType === 'video')
@else
{{ data_get($attachment, 'name', 'Dokumen') }}
@endif
@endforeach
@endif
@php($messageLocation = data_get($item->meta, 'location'))
@if (is_array($messageLocation) && filled(data_get($messageLocation, 'maps_url')))
Lokasi dibagikan
{{ data_get($messageLocation, 'lat') }},
{{ data_get($messageLocation, 'lng') }}
@endif