Skip to content

Conversation

@gabriellsh
Copy link
Member

@gabriellsh gabriellsh commented Jun 16, 2025

Proposed changes (including videos or screenshots)

The VoIP client emits an "outgoingcall" event whenever a call is being established, but an incoming call also has that state when it's first accepted. This made the "dialing" sound be played after the call is accepted, which should not have been the case.

In order to avoid disrupting the current implementation of the VoipClient, a check in the "VoipProvider" was added to ensure that the sound is only played if it's an outgoing call. Ideally, the events that are dispatched from the VoipProvider should be abstract and not share any "VoIP" concepts with the UI, just providing information and states that are relevant for the UI to render the appropriate view.

There's a lot of places where this mix of concepts happen in the current implementation, so a choice was made to provide a simple fix and handle this edge case closer to the UI logic, avoiding breaking any data/event flow from the VoipClient class.

Issue(s)

VSTAB-27

Steps to test or reproduce

Further comments

Seems to have been introduced here: https://github.com/RocketChat/Rocket.Chat/pull/35666/files#diff-529f11d11b8544afbf254f0abacfa6bf5d748024ffa68b14353dba21be904ad6L1-L28

The play function was async at first and depended on a DOM query selector, so by inference it's being assumed that a race condition was "hiding" the issue, and the new CustomSounds "manager" just exposed the existing issue.

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Jun 16, 2025

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@github-actions
Copy link
Contributor

github-actions bot commented Jun 16, 2025

PR Preview Action v1.6.1

🚀 View preview at
https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-36225/

Built to branch gh-pages at 2025-06-20 21:27 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@changeset-bot
Copy link

changeset-bot bot commented Jun 16, 2025

🦋 Changeset detected

Latest commit: 1eff686

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 37 packages
Name Type
@rocket.chat/ui-voip Patch
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/http-router Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/models Patch
@rocket.chat/network-broker Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/instance-status Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov
Copy link

codecov bot commented Jun 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.54%. Comparing base (689f6df) to head (1eff686).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #36225   +/-   ##
========================================
  Coverage    64.54%   64.54%           
========================================
  Files         3148     3148           
  Lines       104632   104632           
  Branches     19775    19820   +45     
========================================
+ Hits         67531    67533    +2     
  Misses       34416    34416           
+ Partials      2685     2683    -2     
Flag Coverage Δ
e2e 57.61% <ø> (+0.03%) ⬆️
unit 69.15% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gabriellsh gabriellsh marked this pull request as ready for review June 16, 2025 21:57
@gabriellsh gabriellsh added this to the 7.8.0 milestone Jun 20, 2025
@gabriellsh gabriellsh added the stat: QA assured Means it has been tested and approved by a company insider label Jun 20, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Jun 20, 2025
@kodiakhq kodiakhq bot merged commit 93acfbe into develop Jun 20, 2025
49 checks passed
@kodiakhq kodiakhq bot deleted the fix/voipRinging branch June 20, 2025 22:08
@ggazzo ggazzo modified the milestones: 7.8.0, 7.9.0 Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants