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>
This commit is contained in:
chahinebrini 2026-05-16 08:50:04 +02:00
parent 2cc0b20fc8
commit dba33b5733

View File

@ -0,0 +1,8 @@
-- 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;