Skip to content

fix(call): ignore stale roomJoined events that fire before joinRoomndCall#6045

Open
tareko wants to merge 1 commit intonextcloud:masterfrom
tareko:fix-call-already-in-progress
Open

fix(call): ignore stale roomJoined events that fire before joinRoomndCall#6045
tareko wants to merge 1 commit intonextcloud:masterfrom
tareko:fix-call-already-in-progress

Conversation

@tareko
Copy link
Copy Markdown
Contributor

@tareko tareko commented Apr 11, 2026

When the app launches and immediately joins an existing call, the WebSocket may already be connected from a previous session. The server sends a stale roomJoined event before joinRoomAndCall() is called, causing performCall() to fire prematurely. Later when joinRoomAndCall runs, the WebSocket does a local join and the server never re-sends the participant list. The call stays stuck in JOINED and never transitions to IN_CONVERSATION.

Add joinRoomInitiated flag to guard the roomJoined handler against stale events. Only process roomJoined after joinRoomAndCall has been called.

This fixes Issue #6044 . I used OpenCode and GLM-5.1 to debug and fix this bug.

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

@AndyScherzinger AndyScherzinger requested a review from mahibi April 11, 2026 21:37
@AndyScherzinger AndyScherzinger added the 3. to review Waiting for reviews label Apr 11, 2026
…dCall

When the app launches and immediately joins an existing call, the
WebSocket may already be connected from a previous session. The server
sends a stale roomJoined event before joinRoomAndCall() is called,
causing performCall() to fire prematurely. Later when joinRoomAndCall
runs, the WebSocket does a local join and the server never re-sends the
participant list. The call stays stuck in JOINED and never transitions
to IN_CONVERSATION.

Add joinRoomInitiated flag to guard the roomJoined handler against stale
events. Only process roomJoined after joinRoomAndCall has been called.

Signed-off-by: Tarek Loubani <tarek@tarek.org>
@tareko tareko force-pushed the fix-call-already-in-progress branch from e0e1c7d to 261d20b Compare April 11, 2026 21:59
@mahibi
Copy link
Copy Markdown
Collaborator

mahibi commented Apr 13, 2026

Hi @tareko
thanks for contributing! we will have a closer look soon!

@mahibi
Copy link
Copy Markdown
Collaborator

mahibi commented Apr 17, 2026

@tareko are you interested to be invited to the nextcloud.com instance as a guest so we could also chat and you can further connect to the community? Should i invite you via tarek@tarek.org ?

Also, do you like to have advanced access to the talk repo? Then you could create PR's inside it instead in your fork, which will simplify the review process

@mahibi
Copy link
Copy Markdown
Collaborator

mahibi commented Apr 20, 2026

Review is planned for this week

@tareko
Copy link
Copy Markdown
Contributor Author

tareko commented Apr 20, 2026

@tareko are you interested to be invited to the nextcloud.com instance as a guest so we could also chat and you can further connect to the community? Should i invite you via tarek@tarek.org ?

Also, do you like to have advanced access to the talk repo? Then you could create PR's inside it instead in your fork, which will simplify the review process

Thank you so much for the honour. I received the invitation and accepted.

@github-actions
Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants