feat: Disabled voice actions in federated rooms
Proposed changes (including videos or screenshots)
Issue(s)
Steps to test or reproduce
Further comments
Summary by CodeRabbit
-
Bug Fixes
- Media call actions are now unavailable in federated rooms.
- Improved subscription handling in room contexts to ensure consistent behavior.
-
Tests
- Added comprehensive test coverage for media call room actions.
- Added comprehensive test coverage for user media call actions.
- Enhanced test infrastructure with improved mock providers for subscription management.
βοΈ Tip: You can customize this high-level summary in your review settings.
Looks like this PR is ready to merge! π If you have any trouble, please check the PR guidelines
β οΈ No Changeset found
Latest commit: 7a702a01b3528a40993ab964286d10d231b83ea8
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Walkthrough
Adds federated room validation to media call action hooks to prevent voice calling in federated rooms. Both useMediaCallRoomAction and useUserMediaCallAction now check if a room is federated using isRoomFederated() and return undefined early. Comprehensive test coverage validates these guard conditions.
Changes
| Cohort / File(s) | Summary |
|---|---|
Federated Room Guard Implementation apps/meteor/client/hooks/roomActions/useMediaCallRoomAction.ts, apps/meteor/client/views/room/hooks/useUserInfoActions/actions/useUserMediaCallAction.ts |
Added early return guard that checks isRoomFederated(room) to prevent media call actions in federated rooms. Imports isRoomFederated from @rocket.chat/core-typings and updates dependency arrays accordingly. |
Test Coverage apps/meteor/client/hooks/roomActions/useMediaCallRoomAction.spec.tsx, apps/meteor/client/views/room/hooks/useUserInfoActions/actions/useUserMediaCallAction.spec.tsx |
Added comprehensive unit tests covering guard conditions: federated rooms, unauthorized VOIP states, blocked subscriptions, same-user scenarios, and valid action configurations with callback verification. |
Estimated code review effort
π― 2 (Simple) | β±οΈ ~12 minutes
- Repetitive pattern: identical federated room guard added to two similar hooks
- Straightforward test files using standard mocking patterns
- No complex logic changes or architectural modifications
- All changes follow consistent conventions
Possibly related PRs
-
RocketChat/Rocket.Chat#37617 β Modifies the same
useMediaCallRoomAction.tsfile with type and import source changes - RocketChat/Rocket.Chat#36952 β Adds federated room checks to other room-related hooks and components
Suggested labels
stat: ready to merge, stat: QA assured
Suggested reviewers
- ggazzo
- sampaiodiego
Poem
π° A call across the stars won't do,
When federation splits in two.
Guard the gateway, check the room,
Voice calling meets its timely doom!
π«πβ¨
Pre-merge checks and finishing touches
β Failed checks (1 inconclusive)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Linked Issues check | β Inconclusive | The PR adds federated room guards to useMediaCallRoomAction and useUserMediaCallAction hooks, preventing voice actions in federated rooms. However, the linked issue FB-46 requires disabling/removing voice buttons from room header and member list kebab menu, which are UI component locations. | Clarify whether the hook-level guards in this PR are the implementation approach for FB-46, or if additional UI component changes are required to fully address the room header and member list locations. |
β Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | β Passed | Check skipped - CodeRabbitβs high-level summary is enabled. |
| Title check | β Passed | The title 'chore: Disabled voice actions in federated rooms' clearly and specifically describes the main change: disabling voice actions in federated rooms, which aligns with the code modifications that add federated room guards. |
| Out of Scope Changes check | β Passed | All changes are directly related to disabling voice actions in federated rooms through hook-level guards and corresponding test coverage, with no unrelated modifications detected. |
| Docstring Coverage | β Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
β¨ Finishing touches
- [ ] π Generate docstrings
π§ͺ Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
- [ ] Commit unit tests in branch
feat/disable-voice-federation
π Recent review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
π₯ Commits
Reviewing files that changed from the base of the PR and between 431e8e4058a55f1b0d51b606bac4dffceb4862e4 and 7aa52b4f55a96fafc4ac6302fc3008abcb9df839.
π Files selected for processing (4)
-
apps/meteor/client/hooks/roomActions/useMediaCallRoomAction.spec.tsx(1 hunks) -
apps/meteor/client/hooks/roomActions/useMediaCallRoomAction.ts(4 hunks) -
apps/meteor/client/views/room/hooks/useUserInfoActions/actions/useUserMediaCallAction.spec.tsx(1 hunks) -
apps/meteor/client/views/room/hooks/useUserInfoActions/actions/useUserMediaCallAction.ts(2 hunks)
π§ Files skipped from review as they are similar to previous changes (4)
- apps/meteor/client/hooks/roomActions/useMediaCallRoomAction.ts
- apps/meteor/client/views/room/hooks/useUserInfoActions/actions/useUserMediaCallAction.ts
- apps/meteor/client/views/room/hooks/useUserInfoActions/actions/useUserMediaCallAction.spec.tsx
- apps/meteor/client/hooks/roomActions/useMediaCallRoomAction.spec.tsx
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.
Comment @coderabbitai help to get the list of available commands and usage tips.
@coderabbitai review
β Actions performed
Review triggered.
Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
π¦ Docker Image Size Report
π Changes 
| Service | Current | Baseline | Change | Percent |
|---|---|---|---|---|
| sum of all images | 1.2GiB | 1.2GiB | +12MiB | |
| rocketchat | 358MiB | 347MiB | +12MiB | |
| omnichannel-transcript-service | 132MiB | 132MiB | -63B | |
| queue-worker-service | 132MiB | 132MiB | +61B | |
| ddp-streamer-service | 126MiB | 126MiB | +127B | |
| account-service | 113MiB | 113MiB | -302B | |
| stream-hub-service | 110MiB | 110MiB | -134B | |
| presence-service | 110MiB | 110MiB | -141B | |
| authorization-service | 110MiB | 110MiB | -570B |
π Historical Trend
---
config:
theme: "dark"
xyChart:
width: 900
height: 400
---
xychart
title "Image Size Evolution by Service (Last 30 Days + This PR)"
x-axis ["11/15 22:28", "11/16 01:28", "11/17 23:50", "11/18 22:53", "11/19 23:02", "11/21 16:49", "11/24 17:34", "11/27 22:32", "11/28 19:05", "12/01 23:01", "12/02 21:57", "12/03 21:00", "12/04 18:17", "12/05 21:56", "12/08 20:15", "12/09 22:17", "12/10 23:26", "12/11 21:56", "12/12 22:45", "12/13 01:34", "12/15 19:52", "12/15 20:29 (PR)"]
y-axis "Size (GB)" 0 --> 0.5
line "account-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
line "authorization-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
line "ddp-streamer-service" [0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12]
line "omnichannel-transcript-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
line "presence-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
line "queue-worker-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
line "rocketchat" [0.36, 0.36, 0.35, 0.35, 0.35, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.35]
line "stream-hub-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
Statistics (last 21 days):
- π Average: 1.5GiB
- β¬οΈ Minimum: 1.2GiB
- β¬οΈ Maximum: 1.6GiB
- π― Current PR: 1.2GiB
βΉοΈ About this report
This report compares Docker image sizes from this build against the develop baseline.
-
Tag:
pr-37714 -
Baseline:
develop - Timestamp: 2025-12-15 20:29:55 UTC
- Historical data points: 21
Updated: Mon, 15 Dec 2025 20:29:55 GMT
Codecov Report
:x: Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 67.78%. Comparing base (cea565b) to head (7a702a0).
:warning: Report is 2 commits behind head on develop.
Additional details and impacted files
@@ Coverage Diff @@
## develop #37714 +/- ##
===========================================
+ Coverage 67.69% 67.78% +0.08%
===========================================
Files 3457 3457
Lines 113831 113836 +5
Branches 20908 20909 +1
===========================================
+ Hits 77061 77165 +104
+ Misses 34639 34536 -103
- Partials 2131 2135 +4
| Flag | Coverage Ξ | |
|---|---|---|
| e2e | 57.38% <71.42%> (+0.02%) |
:arrow_up: |
| e2e-api | 43.29% <ΓΈ> (+0.97%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.