File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
packages/socket.io-postgres-emitter/lib Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -380,9 +380,10 @@ export class BroadcastOperator<
380380 document . type ,
381381 this . emitter . channel ,
382382 ) ;
383- await this . emitter . pool . query (
384- `NOTIFY "${ this . emitter . channel } ", '${ payload } '` ,
385- ) ;
383+ await this . emitter . pool . query ( "SELECT pg_notify($1, $2)" , [
384+ this . emitter . channel ,
385+ payload ,
386+ ] ) ;
386387 } catch ( err ) {
387388 // @ts -ignore
388389 this . emit ( "error" , err ) ;
@@ -407,9 +408,10 @@ export class BroadcastOperator<
407408 type : document . type ,
408409 attachmentId,
409410 } ) ;
410- this . emitter . pool . query (
411- `NOTIFY "${ this . emitter . channel } ", '${ headerPayload } '` ,
412- ) ;
411+ await this . emitter . pool . query ( "SELECT pg_notify($1, $2)" , [
412+ this . emitter . channel ,
413+ headerPayload ,
414+ ] ) ;
413415 }
414416
415417 /**
You can’t perform that action at this time.
0 commit comments