Skip to content

Commit

Permalink
feat: SERVER_SIDE_EMIT support publishOnSpecificResponseChannel
Browse files Browse the repository at this point in the history
related: socketio#407
  • Loading branch information
dr-js committed Apr 9, 2024
1 parent cdb5535 commit 5e295bc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,11 @@ export class RedisAdapter extends Adapter {
}
called = true;
debug("calling acknowledgement with %j", arg);
const responseChannel = this.publishOnSpecificResponseChannel
? `${this.responseChannel}${request.uid}#`
: this.responseChannel;
this.pubClient.publish(
this.responseChannel,
responseChannel,
JSON.stringify({
type: RequestType.SERVER_SIDE_EMIT,
requestId: request.requestId,
Expand Down

0 comments on commit 5e295bc

Please sign in to comment.