Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
366a40356f
commit
2d2ee28c34
@@ -147,7 +147,7 @@ function MessagesPage() {
|
||||
useEffect(() => {
|
||||
if (!uid) return;
|
||||
const ch = supabase
|
||||
.channel("messages-global")
|
||||
.channel(`messages-global-${Math.random().toString(36).slice(2)}`)
|
||||
.on("postgres_changes", { event: "INSERT", schema: "public", table: "messages" }, () => {
|
||||
loadAll();
|
||||
refreshUnread();
|
||||
@@ -477,7 +477,7 @@ function ChatPanel({
|
||||
// Realtime subscription scoped to this conversation
|
||||
useEffect(() => {
|
||||
const ch = supabase
|
||||
.channel(`conv-${conversationId}`)
|
||||
.channel(`conv-${conversationId}-${Math.random().toString(36).slice(2)}`)
|
||||
.on(
|
||||
"postgres_changes",
|
||||
{ event: "*", schema: "public", table: "messages", filter: `conversation_id=eq.${conversationId}` },
|
||||
|
||||
Reference in New Issue
Block a user