Skip to content

fix: hide voice-call icon for users without a phone extension#40862

Draft
ggazzo wants to merge 3 commits into
developfrom
fix/dmv-62-phone-icon-no-extension
Draft

fix: hide voice-call icon for users without a phone extension#40862
ggazzo wants to merge 3 commits into
developfrom
fix/dmv-62-phone-icon-no-extension

Conversation

@ggazzo

@ggazzo ggazzo commented Jun 9, 2026

Copy link
Copy Markdown
Member

Proposed changes

In a direct message the voice-call icon was shown for any user, even one without a phone extension. Clicking it opened the call widget for an instant and then hid it, since the call could not be placed (DMV-62).

When internal calls are routed through SIP (VoIP_TeamCollab_SIP_Integration_For_Internal_Calls), the callee can only be reached if they have a freeSwitchExtension assigned, so useMediaCallRoomAction now gates the action on it. With SIP routing disabled, internal calls are peer-to-peer and need no extension, so the action keeps showing as before.

Visibility rule:
permission AND ( (SIP routing enabled AND peer has extension) OR SIP routing disabled )

Issue(s)

DMV-62

How to test the changes

  1. Enable VoIP_TeamCollab_SIP_Integration_For_Internal_Calls.
  2. Open a DM with a user that has no extension assigned → the phone icon must not appear.
  3. Assign an extension to that user → the phone icon appears.
  4. Disable the setting → the phone icon appears regardless of extension.

Further comments

  • Covered by unit tests in useMediaCallRoomAction.spec.tsx (SIP-routing × extension matrix).
  • freeSwitchExtension is already returned by users.info (DefaultUserInfo), reused from the existing useUserInfoQuery.
    DMV-62

In a DM the voice-call icon was shown for any user, even one without a
phone extension. Clicking it opened the call widget for an instant and
then hid it, since the call could not be placed.

When internal calls are routed through SIP
(`VoIP_TeamCollab_SIP_Integration_For_Internal_Calls`), the callee can
only be reached if they have a `freeSwitchExtension` assigned, so gate
the room action on it. With SIP routing disabled, internal calls are
peer-to-peer and need no extension, so the action keeps showing.

Covered by unit tests on `useMediaCallRoomAction`.
@dionisio-bot

dionisio-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 07d92c7

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

This PR includes changesets to release 3 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings 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

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6181eac5-7767-4e8a-9210-0ab3d3671720

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.12%. Comparing base (1b88937) to head (07d92c7).
⚠️ Report is 8 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #40862    +/-   ##
=========================================
  Coverage    70.12%   70.12%            
=========================================
  Files         3341     3341            
  Lines       123558   123671   +113     
  Branches     22136    22142     +6     
=========================================
+ Hits         86642    86723    +81     
- Misses       33567    33597    +30     
- Partials      3349     3351     +2     
Flag Coverage Δ
e2e 59.27% <50.00%> (-0.07%) ⬇️
e2e-api 46.28% <ø> (+<0.01%) ⬆️
unit 70.96% <100.00%> (+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.

The avatar mock returned a string, which only worked because the prior
tests never resolved the user-info query and so never invoked
getAvatarUrl. The DMV-62 cases await the query, so the peer info is
built and getAvatarUrl is called — make the mock a hook returning a
getter function.
Comment thread apps/meteor/client/hooks/roomActions/useMediaCallRoomAction.ts Outdated
@ggazzo ggazzo changed the title fix: hide voice-call icon for users without a phone extension (DMV-62) fix: hide voice-call icon for users without a phone extension Jun 10, 2026
@ggazzo ggazzo added this to the POC-VOICE milestone Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant