Sebastien Chapuis authored and GitHub committed 2026-01-12 04:56:05 +00:00
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;