RocketChat / RocketChat/Rocket.Chat

[bug] stream-notify-room subscription

Open
#22,970 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

reference : #22817

Description

Hi, I found a bug in the subscription to stream-notify-room in realtime api.

I followed the instruction to subscribe to typing (a event of stream-notify-room) but instead of receive ready answer I receive nosub.

I used ddp library that provides the unique subscription-id. The others parameters are in the format specified by the documentation ( https://developer.rocket.chat/api/realtime-api/subscriptions/stream-notify-room)

Steps to reproduce:

  1. creation of ddp client using ddp lib

  2. connection to server using ddp client

  3. login with ddp client using ddp-login lib

  4. register the guest (call to livechat:registerGuest)

  5. send the first message that creates the room (call to sendMessageLivechat)

  6. subscription: ddpClient.subscribe("stream-notify-room", [roomId+"/typing", false], () => { console.log("subscription"); } );

  7. listen to new message

Expected behavior:

receive { msg: 'ready', subs: [ 'a number' ] }

Actual behavior:

receive { msg: 'nosub', id: 'a number' }

Server Setup Information:

  • Version of Rocket.Chat Server: 3.17.1

  • Operating System: Ubuntu 20.04.2

  • Deployment Method: snap

  • Number of Running Instances: 1

  • DB Replicaset Oplog: Enabled

  • NodeJS Version: 12.22.1

  • MongoDB Version: 3.6.14

  • Proxy: nginx

  • Firewalls involved: none

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the documented stream-notify-room subscription sequence with the DDP client, including guest registration and room creation. Compare the subscription request and the received ready or nosub response; done means the documented typing subscription returns ready on the reported server setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.