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<
380
380
document . type ,
381
381
this . emitter . channel ,
382
382
) ;
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
+ ] ) ;
386
387
} catch ( err ) {
387
388
// @ts -ignore
388
389
this . emit ( "error" , err ) ;
@@ -407,9 +408,10 @@ export class BroadcastOperator<
407
408
type : document . type ,
408
409
attachmentId,
409
410
} ) ;
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
+ ] ) ;
413
415
}
414
416
415
417
/**
You can’t perform that action at this time.
0 commit comments