From d364e56456cae2e75c2731bbf3d280c69d981abd Mon Sep 17 00:00:00 2001 From: Pierre Date: Wed, 27 Mar 2024 15:01:34 -0300 Subject: [PATCH 1/2] fix: internal server error when connecting to publication with backward compatibility flag --- .changeset/great-yaks-dream.md | 5 +++++ ee/apps/ddp-streamer/src/Publication.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/great-yaks-dream.md diff --git a/.changeset/great-yaks-dream.md b/.changeset/great-yaks-dream.md new file mode 100644 index 000000000000..8662762380cb --- /dev/null +++ b/.changeset/great-yaks-dream.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/ddp-streamer': patch +--- + +Fixed an internal server error when using the backwards compatibility flag to connect to the real time API for listening to all server message notifications. diff --git a/ee/apps/ddp-streamer/src/Publication.ts b/ee/apps/ddp-streamer/src/Publication.ts index af2459354ac0..71874b942ee4 100644 --- a/ee/apps/ddp-streamer/src/Publication.ts +++ b/ee/apps/ddp-streamer/src/Publication.ts @@ -19,7 +19,7 @@ export class Publication extends EventEmitter implements IPublication { this.once('stop', () => client.subscriptions.delete(packet.id)); this._session = { - sendAdded: this.added, + sendAdded: this.added.bind(this), socket: client, userId: client.userId, }; From 8539364f13ce10b66949b641c3b71016ed94980c Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Thu, 28 Mar 2024 17:10:23 -0300 Subject: [PATCH 2/2] Update .changeset/great-yaks-dream.md --- .changeset/great-yaks-dream.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.changeset/great-yaks-dream.md b/.changeset/great-yaks-dream.md index 8662762380cb..e4049a442543 100644 --- a/.changeset/great-yaks-dream.md +++ b/.changeset/great-yaks-dream.md @@ -1,4 +1,5 @@ --- +'@rocket.chat/meteor': patch '@rocket.chat/ddp-streamer': patch ---