feature: Add "Mark as Read" action button to push notifications
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- android, ios, react-native, swift, typescript
- 領域
- mobile, mobile-dev
調査の方向性
まず app/lib/notifications/push.ts と ios/ReplyNotification.swift から始め、既存の REPLY_ACTION handler と、subscriptions.read API の使用箇所について app/lib/methods/readMessages.ts を調べます。通知 payload が rid をどのように提供するか、また両プラットフォームでフォアグラウンドとバックグラウンドのアクションがどのように処理されるかを追跡します。Mark as Read アクションが subscriptions.read を呼び出し、room の通知と未読状態をクリアし、フォアグラウンドとバックグラウンドの両方で動作すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Feature Description
Add a "Mark as Read" quick action button to push notifications, similar to WhatsApp, Telegram, and Slack messaging apps. This would allow users to mark messages/rooms as read directly from the notification without opening the app.
Proposed Behavior:
-
When a user receives a chat notification, they would see action buttons including:
- Reply (already exists)
- Mark as Read (NEW)
-
Tapping "Mark as Read" would:
- Call the
subscriptions.readAPI endpoint - Clear the unread badge for that room
- Remove the notification from the notification tray
- Update the room's read status on the server
- Call the
This feature would work in both foreground and background states.
Motivation and Use Case
User Pain Points:
- Notification Overload: Users often receive many notifications during busy periods and want a quick way to triage them without opening each conversation
- Workflow Interruption: Currently, users must open the app and navigate to each room just to mark messages as read, which disrupts their current task
- Mobile UX Expectations: Modern messaging apps (WhatsApp, Telegram, Slack, Microsoft Teams) all provide this functionality, making it a standard user expectation
Benefits:
Faster notification management - One tap vs opening app → navigating to room → going back
Reduced app opens - Better battery life and performance
Better focus - Users can clear notifications without context switching
Cleaner notification tray - Reduces notification fatigue
Professional UX - Matches expectations from other enterprise chat apps
Implementation Ideas
Technical Implementation Plan:
Phase 1: iOS (Easier to implement)
- Add Notification Action (app/lib/notifications/push.ts)
const markAsReadAction = new NotificationAction(
'MARK_AS_READ_ACTION',
'background', // Can execute in background
I18n.t('Mark_as_read'),
false // Doesn't require text input
);
const notificationCategory = new NotificationCategory('MESSAGE', [
notificationAction, // Existing Reply action
markAsReadAction // NEW action
]);
-
Add Native Handler (ios/ReplyNotification.swift)
- Add handler similar to existing REPLY_ACTION
- Extract rid from notification payload
- Call subscriptions.read API endpoint
- Handle success/failure cases
-
API Integration
- Endpoint: POST subscriptions.read (already exists!)
- Parameters: { rid: string, readThreads?: boolean }
- Auth: Use existing RocketChat helper class
Phase 2: Android
Android requires custom notification channel configuration:
- Create notification action in Java/Kotlin
- Wire up to existing API methods
- Handle background execution
API Requirements:
Good news: The required API already exists!
- Endpoint: subscriptions.read (available since RC 0.61.0)
- Current usage: Already used in app/lib/methods/readMessages.ts
- No server changes needed
API Flow:
Notification Action → Extract rid → POST subscriptions.read { rid } → Update local DB → Clear notification
Edge Cases to Handle:
-
Network Unavailable:
- Queue action for retry when connection restored
- Or show brief error notification
-
Expired Auth Token:
- Attempt token refresh
- Gracefully fail if user needs to re-login
-
Multiple Notifications from Same Room:
- Mark all as read when action is triggered on any one
-
Encrypted Rooms:
- Works the same way (marks as read, doesn't affect encryption)
Is this feature available in the API or web version?
Available in API
Rocket.Chat Server Version
Any version >= 0.61.0 (subscriptions.read API available)
Rocket.Chat App Version
4.68.0
Device Name
All iOS and Android devices
OS Version
iOS 13+ / Android 7.0+ (notification actions support)
Additional Context
This is the feature i am talking about !!
- 主要言語
- TypeScript
- スター
- 2.4k
- フォーク
- 1.5k
- 平均マージ
- 1日 15時間
- マージ済み PR(30日)
- 29
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
RocketChat/Rocket.Chat.ReactNative のほかの issue
-
[IMPROVEMENT] Remove redundant `await` on synchronous `userPreferences.getBool` in `getUsersPresence`対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンtype: feature
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
RocketChat/Rocket.Chat.ReactNative#7737 ·
メンテナーはふだん 1 日以内に返信
-
UIKit modal: a viewSubmit response with no `type` field fails to close the modal on mobile (regression from #7057)対応中かも @erikurt9 が 106 日前に担当しました。 オープンtype: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
RocketChat/Rocket.Chat.ReactNative#7503 · コメント 3 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
type: bug
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
RocketChat/Rocket.Chat.ReactNative#7437 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
✅ tests 👷 ci type: feature
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
RocketChat/Rocket.Chat.ReactNative#7247 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug: goRoom navigates to broken RoomView after failed DM creation from search対応中かも @deepak0x が 216 日前に担当しました。 オープンtype: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
RocketChat/Rocket.Chat.ReactNative#7098 ·
メンテナーはふだん 1 日以内に返信
RocketChat/Rocket.Chat.ReactNative の issue をすべて見る
似ている issue
-
Out of order / duplicate key error shows the key bytes as decimal or UTF-8, not hex対応中かも @bardrop が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
-
`/leaderboard`, the page and the share image say "be the first" for a program that hasn't startedオープンbug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
codercops/discord-bot#152 ·
メンテナーはふだん 1 日以内に返信
-
bug i18n
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
endora-commerce/endora-commerce#1315 ·
メンテナーはふだん 1 日以内に返信
-
area:data-quality importer size:S
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
enorm-labs/event-junkie#5136 ·
メンテナーはふだん 1 日以内に返信
-
fix(scripts): set-device-owner.ps1 fails to parse on Windows PowerShell 5.1 (UTF-8 without BOM)オープン
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信