Files
CFDivePlatform/frontend
a620906209 6b3a0816f5 fix: 聊天室樂觀更新 + private channel fallback
問題:presence channel 在另一方加入的瞬間可能短暫抖動,
導致雙方都收不到 MessageSent event,訊息消失需重整。

三項修正:
1. sendText 樂觀更新:訊息送出後立即顯示暫存訊息,
   不依賴 WebSocket event 才出現。
2. MessageSent handler deduplication:自己的訊息收到
   event 時,替換暫存訊息而非重複 push。
3. Private channel fallback:receiver 的 private channel
   收到 notification.created 時,補拉一次訊息歷史,
   確保 presence channel 失效時仍能同步。使用
   stopListening 避免干擾 notifications store 的訂閱。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 17:59:10 +08:00
..

Vue 3 + Vite

This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 <script setup> SFCs, check out the script setup docs to learn more.

Learn more about IDE Support for Vue in the Vue Docs Scaling up Guide.