From fa582218b3c5d54f3b38b85a27d04a9d47224ce7 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Fri, 3 Oct 2025 18:26:04 +0000 Subject: [PATCH] Add INSERT RLS policy for Realtime --- ...0251003182550_cf42b6f7-eacc-40f5-a44d-6d2741787670.sql | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 supabase/migrations/20251003182550_cf42b6f7-eacc-40f5-a44d-6d2741787670.sql diff --git a/supabase/migrations/20251003182550_cf42b6f7-eacc-40f5-a44d-6d2741787670.sql b/supabase/migrations/20251003182550_cf42b6f7-eacc-40f5-a44d-6d2741787670.sql new file mode 100644 index 00000000..1e5808b2 --- /dev/null +++ b/supabase/migrations/20251003182550_cf42b6f7-eacc-40f5-a44d-6d2741787670.sql @@ -0,0 +1,8 @@ +-- Add INSERT RLS policy on realtime.messages for moderators to enable broadcast channels +-- This allows authenticated moderators to send broadcasts on private channels + +CREATE POLICY "Moderators can send broadcasts" +ON "realtime"."messages" +FOR INSERT +TO authenticated +WITH CHECK (check_realtime_access()); \ No newline at end of file