Skip to content

Commit 5e295bc

Browse files
committed
feat: SERVER_SIDE_EMIT support publishOnSpecificResponseChannel
related: socketio#407
1 parent cdb5535 commit 5e295bc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,11 @@ export class RedisAdapter extends Adapter {
412412
}
413413
called = true;
414414
debug("calling acknowledgement with %j", arg);
415+
const responseChannel = this.publishOnSpecificResponseChannel
416+
? `${this.responseChannel}${request.uid}#`
417+
: this.responseChannel;
415418
this.pubClient.publish(
416-
this.responseChannel,
419+
responseChannel,
417420
JSON.stringify({
418421
type: RequestType.SERVER_SIDE_EMIT,
419422
requestId: request.requestId,

0 commit comments

Comments
 (0)