@extends('layouts.app') @section('title', '跨組織訊息') @section('content')
{{-- 左側:跨組織對話清單 --}}
跨組織對話
  • 載入中…
已隱藏的跨組織聊天 (0)
    {{-- 右側:對話串 --}}
    {{ mb_substr($contact->name ?? '?', 0, 1) }}
    {{ $contact->name ?? $conversation->peer_federated_id }}
    {{ $conversation->peerOrgId() }} @if($contact?->department) {{ $contact->department }} @endif
    聊天背景
    —
    @forelse($messages as $m)
    recalled_at) data-recalled="1" @endif @if($m->encrypted && !$m->recalled_at) data-encrypted="1" data-body="{{ $m->body }}" data-iv="{{ $m->iv }}" data-key-version="{{ $m->key_version }}" @endif > @if($m->direction !== 'outbound')
    {{ mb_substr($contact->name ?? '?', 0, 1) }}
    @endif
    @if($m->recalled_at) 此訊息已收回 @else @if($m->reply_to)
    reply_to['encrypted'] && !$m->reply_to['recalled']) data-reply-encrypted="1" data-reply-type="{{ $m->reply_to['type'] }}" data-reply-body="{{ $m->reply_to['body'] }}" data-reply-iv="{{ $m->reply_to['iv'] }}" data-reply-key-version="{{ $m->reply_to['key_version'] }}" @endif >
    {{ $m->reply_to['direction'] === 'outbound' ? '你' : ($contact->name ?? '對方') }}
    @if($m->reply_to['recalled']) 此訊息已收回 @elseif($m->reply_to['encrypted']) 解密中… @else {{ match($m->reply_to['type']) { 'image' => '[圖片]', 'sticker' => '[貼圖]', 'location' => '[位置]', default => \Illuminate\Support\Str::limit($m->reply_to['body'], 60) } }} @endif
    @endif @if($m->encrypted)
    解密中…
    @elseif($m->type === 'image') 圖片 @elseif($m->type === 'sticker') 貼圖 @elseif($m->type === 'location') @php($loc = json_decode($m->body ?? '{}', true)) 查看位置 @else
    {{ $m->body }}
    @endif @endif
    @if($m->direction === 'outbound' && !$m->recalled_at) {{ ($peerReadAt && $m->created_at->lte($peerReadAt)) ? '已讀' : '未讀' }} · @endif {{ $m->created_at->format('H:i') }} @if($m->edited_at && !$m->recalled_at) · 已編輯 @endif
    @empty
    還沒有訊息,說聲哈囉吧。
    @endforelse
    {{-- 回覆/編輯中的提示條,蓋在輸入框正上方 --}}
    {{-- 跟本地聊天室 index.blade.php 一樣:貼圖/表情共用同一個彈出面板、 同一顆按鈕,靠上面兩個分頁切換,預設打開時停在「貼圖」分頁。 --}}
    @endsection