chahinebrini dba33b5733 feat(db): enable realtime publication for direct_messages + chat_messages
Same pattern as notifications/protected_devices/user_custom_domains:
without ALTER PUBLICATION supabase_realtime ADD TABLE, Postgres does
not broadcast inserts and clients receive no live messages.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 08:50:04 +02:00

9 lines
502 B
SQL

-- Enable Supabase Realtime for direct_messages and chat_messages tables.
-- Fixes missing live delivery on the DM-Page:
-- rebreak.direct_messages and rebreak.chat_messages were not part of the
-- supabase_realtime publication, causing postgres_changes subscriptions
-- (INSERT events) to be silently dropped — messages only appeared after
-- manual refresh.
ALTER PUBLICATION supabase_realtime ADD TABLE rebreak.direct_messages;
ALTER PUBLICATION supabase_realtime ADD TABLE rebreak.chat_messages;