fix(android): add VoIP notification channel and rename Push_Troubleshooting i18n key#7119
fix(android): add VoIP notification channel and rename Push_Troubleshooting i18n key#7119diegolmello wants to merge 6 commits intodevelopfrom
Conversation
…ooting i18n key - Add "Calls" notification channel (rocketchatrn_channel_calls, IMPORTANCE_HIGH) ready for feat.voip-lib-new to wire up VoIP rendering - Rename "All" → "Messages" for the existing messages channel - Rename i18n key Push_Troubleshooting → Troubleshooting in 4 locales (en, cs, no deleted the old key; pt-BR replaced with localized translation) Known limitation: Android cannot rename a channel's display name in-place; deleting and recreating the channel resets per-channel user preferences.
WalkthroughIntroduces two Android notification channels (messages and calls) and replaces the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
android/app/src/main/java/chat/rocket/reactnative/notification/CustomPushNotification.java (1)
304-317:callsChannelis created but not wired to the notification building flow.The new
CALLS_CHANNEL_IDchannel is defined and created in this file (lines 55, 310), butbuildNotification()(line 353) always usesCHANNEL_IDinstead, so the Calls notification settings won't affect actual call alerts. Additionally,voipnotifications are ignored entirely (lines 117-120) and routed elsewhere viaVideoConfNotification, which uses its ownvideo-conf-callchannel.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@android/app/src/main/java/chat/rocket/reactnative/notification/CustomPushNotification.java` around lines 304 - 317, The calls NotificationChannel (callsChannel / CALLS_CHANNEL_ID) is never used when building notifications; update buildNotification() to select CHANNEL_ID for regular messages and CALLS_CHANNEL_ID for call-type alerts (detect by the notification type or payload flag used for calls/voip) so call notifications are posted to the callsChannel; also adjust the voip handling (the voip branch and VideoConfNotification usage) so voip/call payloads are either routed through buildNotification() with CALLS_CHANNEL_ID or ensure VideoConfNotification explicitly uses the same CALLS_CHANNEL_ID (instead of a separate "video-conf-call" channel) so call-related notification settings apply consistently.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@android/app/src/main/java/chat/rocket/reactnative/notification/CustomPushNotification.java`:
- Around line 304-317: The calls NotificationChannel (callsChannel /
CALLS_CHANNEL_ID) is never used when building notifications; update
buildNotification() to select CHANNEL_ID for regular messages and
CALLS_CHANNEL_ID for call-type alerts (detect by the notification type or
payload flag used for calls/voip) so call notifications are posted to the
callsChannel; also adjust the voip handling (the voip branch and
VideoConfNotification usage) so voip/call payloads are either routed through
buildNotification() with CALLS_CHANNEL_ID or ensure VideoConfNotification
explicitly uses the same CALLS_CHANNEL_ID (instead of a separate
"video-conf-call" channel) so call-related notification settings apply
consistently.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b53f4101-f100-4052-bb71-ae2175fc624c
📒 Files selected for processing (7)
android/app/src/main/java/chat/rocket/reactnative/notification/CustomPushNotification.javaapp/i18n/locales/af.jsonapp/i18n/locales/cs.jsonapp/i18n/locales/en.jsonapp/i18n/locales/no.jsonapp/i18n/locales/pt-BR.jsonapp/views/PushTroubleshootView/index.tsx
💤 Files with no reviewable changes (3)
- app/i18n/locales/en.json
- app/i18n/locales/cs.json
- app/i18n/locales/no.json
📜 Review details
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{js,jsx,ts,tsx,json}
📄 CodeRabbit inference engine (CLAUDE.md)
Configure Prettier with tabs, single quotes, 130 character width, no trailing commas, arrow parens avoid, and bracket same line
Files:
app/i18n/locales/af.jsonapp/views/PushTroubleshootView/index.tsxapp/i18n/locales/pt-BR.json
app/i18n/**/*
📄 CodeRabbit inference engine (CLAUDE.md)
Place internationalization configuration and locales in app/i18n/ with support for 40+ languages and RTL
Files:
app/i18n/locales/af.jsonapp/i18n/locales/pt-BR.json
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Use ESLint with
@rocket.chat/eslint-configbase configuration including React, React Native, TypeScript, and Jest plugins
Files:
app/views/PushTroubleshootView/index.tsx
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Use TypeScript with strict mode enabled and configure baseUrl to app/ for import resolution
**/*.{ts,tsx}: Use TypeScript for type safety; add explicit type annotations to function parameters and return types
Prefer interfaces over type aliases for defining object shapes in TypeScript
Use enums for sets of related constants rather than magic strings or numbers
Files:
app/views/PushTroubleshootView/index.tsx
app/views/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Place screen components in app/views/ directory
Files:
app/views/PushTroubleshootView/index.tsx
**/*.{js,ts,jsx,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{js,ts,jsx,tsx}: Use descriptive names for functions, variables, and classes that clearly convey their purpose
Write comments that explain the 'why' behind code decisions, not the 'what'
Keep functions small and focused on a single responsibility
Use const by default, let when reassignment is needed, and avoid var
Prefer async/await over .then() chains for handling asynchronous operations
Use explicit error handling with try/catch blocks for async operations
Avoid deeply nested code; refactor complex logic into helper functions
Files:
app/views/PushTroubleshootView/index.tsx
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: RocketChat/Rocket.Chat.ReactNative PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-07T17:49:17.538Z
Learning: Applies to app/lib/services/voip/**/*.{ts,tsx} : Implement VoIP with WebRTC peer-to-peer audio calls in app/lib/services/voip/ using Zustand stores instead of Redux, with native CallKit (iOS) and Telecom (Android) integration; keep VoIP and VideoConf separate
🔇 Additional comments (4)
app/i18n/locales/af.json (1)
2-2: Good key migration for locale fallback.Adding
Troubleshootinghere is consistent with the renamed key and keeps fallback behavior intact.app/views/PushTroubleshootView/index.tsx (1)
31-31: Key rename applied correctly in navigation title.
I18n.t('Troubleshooting')matches the new locale key and keeps the screen title aligned with the i18n changes.app/i18n/locales/pt-BR.json (1)
889-889: pt-BR translation update looks good.
"Resolução de Problemas"is a solid localized value for the renamedTroubleshootingkey.android/app/src/main/java/chat/rocket/reactnative/notification/CustomPushNotification.java (1)
54-56: Good channel split setup with stable message channel ID.Keeping
CHANNEL_IDunchanged while introducing dedicated calls constants is a safe migration approach.
PR #7119 incorrectly added Troubleshooting to af.json (unsupported locale) instead of the 20 supported locales that were missing it. - Revert af.json to empty {} - Add "Troubleshooting": "Troubleshooting" to all LANGUAGES locales that were missing the key
…d locales PR #7119 only renamed Push_Troubleshooting → Troubleshooting in 4 locales, leaving 20 supported locales without the key. - Add "Troubleshooting" with proper translations to all LANGUAGES locales (ar, bn-IN, de, es, fi, fr, hi-IN, hu, it, ja, nl, pt-PT, ru, sl-SI, sv, ta-IN, te-IN, tr, zh-CN, zh-TW) - Locales en, cs, no, nn, pt-BR already had the key from before the PR - af.json reverted to {} (not a supported locale)
Proposed changes
Adds VoIP "Calls" notification channel infrastructure and renames the
Push_Troubleshootingi18n key toTroubleshooting.Android Notification Channels
rocketchatrn_channel_01— display name changed "All" → "Messages"rocketchatrn_channel_calls,IMPORTANCE_HIGH— ready forfeat.voip-lib-newto route VoIP notifications herei18n
en.json,cs.json,no.json: deletedPush_Troubleshootingkey (self-references via i18n-js fallback)pt-BR.json: replacedPush_Troubleshooting→Troubleshootingwith localized translation "Resolução de Problemas"app/views/PushTroubleshootView/index.tsx: updated to use new keyIssue(s)
https://rocketchat.atlassian.net/browse/VMUX-65
Closes related to notification channel configuration for VoIP readiness.
How to test or reproduce
Types of changes
Checklist
Further comments
Known limitation: Android cannot rename a channel's display name in-place. The "All" → "Messages" rename requires deleting and recreating the channel, which resets per-channel user preferences.
i18n tooling: External tooling (Crowdin/Transifex) referencing
Push_Troubleshootingwill need updates.Future work:
feat.voip-lib-newwill remove the VoIP early return atCustomPushNotification.java:115-118and route VoIP notifications to the "Calls" channel.Summary by CodeRabbit
New Features
Localization