Revert "fix(backend/realtime): add community_posts to supabase_realtime publication"

This reverts commit 0679aa6218e56710a7290770bcb94d0913d9721d.
This commit is contained in:
chahinebrini 2026-05-16 00:48:13 +02:00
parent 0679aa6218
commit 6f760f3aea

View File

@ -1,15 +0,0 @@
-- Enable Supabase Realtime for rebreak.community_posts.
--
-- Why: foreign-like counts never updated in the feed because the table was
-- never in the supabase_realtime publication. useCommunityRealtime hooks
-- listen for UPDATE on community_posts (likes_count, dislikes_count,
-- comments_count, reposts_count) and patch the React-Query cache so visible
-- PostCards re-render with the new count. Without the publication entry the
-- whole channel is silent — users only ever saw the notifications channel
-- fire (rebreak.notifications was added in 20260511) and assumed realtime
-- was working end to end. It wasn't, for posts.
--
-- After deploy, the count on a PostCard should reflect a foreign user's like
-- within ~200ms of the API write, without pull-to-refresh.
ALTER PUBLICATION supabase_realtime ADD TABLE rebreak.community_posts;