mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 09:55:06 +03:00
docs: Fix documentation for realtime.send call (#39839)
The json payload is the first parameter: https://github.com/supabase/realtime/blob/5290aa117baabcd9d8c324e6c22574c348d35295/lib/realtime/tenants/repo/migrations/20250714121412_broadcast_send_error_logging.ex#L7
This commit is contained in:
1 parent
bece7836aa
commit
86f4bea83d
1 file changed
+2
-2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user