From 30430f0985f8e7c49394543d4c84913b6a15df60 Mon Sep 17 00:00:00 2001 From: Damien Arrachequesne Date: Tue, 3 May 2022 15:37:42 +0200 Subject: [PATCH] fix: forward the local flag to the adapter when using fetchSockets() Related: - https://github.com/socketio/socket.io/issues/4359 - https://github.com/socketio/socket.io-redis-adapter/issues/454 --- lib/broadcast-operator.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/broadcast-operator.ts b/lib/broadcast-operator.ts index 6339aaf1ae..32f6980b55 100644 --- a/lib/broadcast-operator.ts +++ b/lib/broadcast-operator.ts @@ -262,6 +262,7 @@ export class BroadcastOperator .fetchSockets({ rooms: this.rooms, except: this.exceptRooms, + flags: this.flags, }) .then((sockets) => { return sockets.map((socket) => { @@ -289,6 +290,7 @@ export class BroadcastOperator { rooms: this.rooms, except: this.exceptRooms, + flags: this.flags, }, Array.isArray(room) ? room : [room] ); @@ -305,6 +307,7 @@ export class BroadcastOperator { rooms: this.rooms, except: this.exceptRooms, + flags: this.flags, }, Array.isArray(room) ? room : [room] ); @@ -321,6 +324,7 @@ export class BroadcastOperator { rooms: this.rooms, except: this.exceptRooms, + flags: this.flags, }, close );