Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

docs: Fix documentation for `realtime.send` call (#39839)

Sebastien Chapuis86f4bea83dfd
diff --git a/apps/docs/content/guides/realtime/getting_started.mdx b/apps/docs/content/guides/realtime/getting_started.mdx
index 7e24d00d2a2..8860fbbf94a 100644
--- a/apps/docs/content/guides/realtime/getting_started.mdx
+++ b/apps/docs/content/guides/realtime/getting_started.mdx
@@ -501,14 +501,14 @@ BEGIN
-- Send custom notification when new message is created
IF TG_OP = 'INSERT' THEN
PERFORM realtime.send(
- 'room:' || NEW.room_id::text || ':notifications',
- 'message_created',
jsonb_build_object(
'message_id', NEW.id,
'user_id', NEW.user_id,
'room_id', NEW.room_id,
'created_at', NEW.created_at
),
+ 'message_created',
+ 'room:' || NEW.room_id::text || ':notifications',
true -- private channel
);
END IF;