feat(apps): add method to find user by freeswitch extension to apps user bridge#40604
Conversation
|
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: 6dc4b39 The changes in this PR will be included in the next version bump. This PR includes changesets to release 43 packages
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 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx,js}📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
Files:
🔇 Additional comments (1)
WalkthroughThis PR enables apps to fetch users by FreeSWITCH SIP extension by adding an optional ChangesSIP Extension User Lookup Capability
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #40604 +/- ##
===========================================
+ Coverage 69.63% 69.68% +0.05%
===========================================
Files 3323 3323
Lines 122762 122805 +43
Branches 21898 21914 +16
===========================================
+ Hits 85481 85580 +99
+ Misses 33915 33873 -42
+ Partials 3366 3352 -14
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
da07f69 to
557e387
Compare
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/meteor/app/apps/server/converters/users.js`:
- Line 78: convertToRocketChat currently assigns sipExtension:
user.freeSwitchExtension which reverses the mapping and drops the actual
app-exposed field; change the mapping in convertToRocketChat to set
freeSwitchExtension: user.sipExtension (i.e., read user.sipExtension and write
it into the Rocket.Chat field freeSwitchExtension) so the app's sipExtension
prop is persisted to Rocket.Chat correctly; verify the opposite direction
(convertFromRocketChat) still maps freeSwitchExtension → sipExtension
consistently.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 331bbe39-9004-477f-9453-04189c468e41
📒 Files selected for processing (7)
.changeset/public-ravens-like.mdapps/meteor/app/apps/server/bridges/users.tsapps/meteor/app/apps/server/converters/users.jspackages/apps-engine/src/definition/accessors/IUserRead.tspackages/apps-engine/src/definition/users/IUser.tspackages/apps/src/server/accessors/UserRead.tspackages/apps/src/server/bridges/UserBridge.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: 🔨 Test Unit / Unit Tests
- GitHub Check: 🔎 Code Check / Code Lint
- GitHub Check: 🔎 Code Check / TypeScript
- GitHub Check: 🔨 Test Storybook / Test Storybook
- GitHub Check: 📦 Meteor Build (coverage)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation
Files:
packages/apps/src/server/bridges/UserBridge.tspackages/apps-engine/src/definition/users/IUser.tspackages/apps-engine/src/definition/accessors/IUserRead.tspackages/apps/src/server/accessors/UserRead.tsapps/meteor/app/apps/server/converters/users.jsapps/meteor/app/apps/server/bridges/users.ts
🧠 Learnings (6)
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In the Rocket.Chat repository, do not reference Biome lint rules in code review feedback. Biome is not used even if biome.json exists; only reference Biome rules if there is explicit, project-wide usage documented. For TypeScript files, review lint implications without Biome guidance unless the project enables Biome rules.
Applied to files:
packages/apps/src/server/bridges/UserBridge.tspackages/apps-engine/src/definition/users/IUser.tspackages/apps-engine/src/definition/accessors/IUserRead.tspackages/apps/src/server/accessors/UserRead.tsapps/meteor/app/apps/server/bridges/users.ts
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In this repository (RocketChat/Rocket.Chat), Biome lint rules are not used even if a biome.json exists. When reviewing TypeScript files (e.g., packages/ui-voip/src/providers/useMediaSession.ts), ensure lint suggestions do not reference Biome-specific rules. Rely on general ESLint/TypeScript lint rules and project conventions instead.
Applied to files:
packages/apps/src/server/bridges/UserBridge.tspackages/apps-engine/src/definition/users/IUser.tspackages/apps-engine/src/definition/accessors/IUserRead.tspackages/apps/src/server/accessors/UserRead.tsapps/meteor/app/apps/server/bridges/users.ts
📚 Learning: 2026-05-06T12:21:44.083Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 40256
File: apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx:121-149
Timestamp: 2026-05-06T12:21:44.083Z
Learning: Field wrappers in rocket.chat/fuselage-forms (Field, FieldLabel, FieldRow, FieldError, FieldHint) auto-create htmlFor/id associations, aria-describedby, and role="alert" for errors. Do not manually set htmlFor, id, aria-describedby, or role attributes when using these wrappers. This automatic wiring does not apply to plain rocket.chat/fuselage components, which require explicit ID wiring per the accessibility docs. In code reviews, prefer using fuselage-forms wrappers for form fields and verify there is no unnecessary manual ID/aria wiring in files that use these wrappers. If a component uses plain fuselage components, ensure proper id wiring as per docs.
Applied to files:
packages/apps/src/server/bridges/UserBridge.tspackages/apps-engine/src/definition/users/IUser.tspackages/apps-engine/src/definition/accessors/IUserRead.tspackages/apps/src/server/accessors/UserRead.tsapps/meteor/app/apps/server/bridges/users.ts
📚 Learning: 2026-05-11T21:46:23.471Z
Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 40463
File: packages/apps/src/lib/SecureFields.ts:17-19
Timestamp: 2026-05-11T21:46:23.471Z
Learning: In Rocket.Chat’s `packages/apps/tsconfig.json`, TypeScript `"strict"` is set to `false`, which disables strict type-checking (including `noImplicitAny`) for `packages/apps`. When reviewing, do not flag TS7053 (and similar strict-mode indexing/type errors) in files under `packages/apps/src/` that are a consequence of this relaxed strictness—e.g., patterns like indexing an `unknown`/`object` via optional chaining such as `object?.[kSecureFields]`.
Applied to files:
packages/apps/src/server/bridges/UserBridge.tspackages/apps/src/server/accessors/UserRead.ts
📚 Learning: 2026-05-06T20:47:53.078Z
Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 40186
File: apps/meteor/app/apps/server/bridges/uiInteraction.ts:2-2
Timestamp: 2026-05-06T20:47:53.078Z
Learning: Deep imports must be used in this repository because Meteor’s bundler does not respect package.json exports subpath mappings. Import using deep paths (e.g., rocket.chat/apps/dist/server/bridges/UiInteractionBridge) instead of relying on exports. Do not suggest or apply changes to exports maps in Meteor-consuming packages (e.g., packages/apps/package.json) as a fix for deep imports. This guideline applies to all TypeScript files under apps/meteor/app/apps/server/bridges.
Applied to files:
apps/meteor/app/apps/server/bridges/users.ts
📚 Learning: 2026-03-16T21:50:37.589Z
Learnt from: amitb0ra
Repo: RocketChat/Rocket.Chat PR: 39676
File: .changeset/migrate-users-register-openapi.md:3-3
Timestamp: 2026-03-16T21:50:37.589Z
Learning: For changes related to OpenAPI migrations in Rocket.Chat/OpenAPI, when removing endpoint types and validators from rocket.chat/rest-typings (e.g., UserRegisterParamsPOST, /v1/users.register) document this as a minor changeset (not breaking) per RocketChat/Rocket.Chat-Open-API#150 Rule 7. Note that the endpoint type is re-exposed via a module augmentation .d.ts in the consuming package (e.g., packages/web-ui-registration/src/users-register.d.ts). In reviews, ensure the changeset clearly states: this is a non-breaking change, the major version should not be bumped, and the changeset reflects a minor version bump. Do not treat this as a breaking change during OpenAPI migrations.
Applied to files:
.changeset/public-ravens-like.md
🔇 Additional comments (7)
.changeset/public-ravens-like.md (1)
1-7: LGTM!packages/apps-engine/src/definition/users/IUser.ts (1)
24-24: LGTM!packages/apps-engine/src/definition/accessors/IUserRead.ts (1)
12-13: LGTM!packages/apps/src/server/bridges/UserBridge.ts (1)
21-25: LGTM!Also applies to: 77-78
packages/apps/src/server/accessors/UserRead.ts (1)
20-27: LGTM!apps/meteor/app/apps/server/converters/users.js (1)
48-48: LGTM!apps/meteor/app/apps/server/bridges/users.ts (1)
44-47: LGTM!Also applies to: 49-50
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@sampaiodiego This was a suggestion from @pierre-lehnen-rc , he pointed out the plan is exactly to rename the field to |
Proposed changes (including videos or screenshots)
Issue(s)
DMV-12
Steps to test or reproduce
Further comments
Summary by CodeRabbit