feature: Add "Mark as Read" action button to push notifications
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- android, ios, react-native, swift, typescript
- Lĩnh vực
- mobile, mobile-dev
Hướng nghiên cứu
Bắt đầu với app/lib/notifications/push.ts và ios/ReplyNotification.swift, sau đó kiểm tra handler REPLY_ACTION hiện có và app/lib/methods/readMessages.ts để xem cách sử dụng API subscriptions.read. Theo dõi cách các payload thông báo cung cấp rid và cách các action ở foreground và background được xử lý trên cả hai nền tảng. Hoàn tất khi action Mark as Read gọi subscriptions.read, xóa thông báo của room và trạng thái chưa đọc, đồng thời hoạt động ở cả foreground và background.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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 !!
- Ngôn ngữ chính
- TypeScript
- Star
- 2.4k
- Fork
- 1.5k
- Merge trung bình
- 1 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 29
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của RocketChat/Rocket.Chat.ReactNative
-
[IMPROVEMENT] Remove redundant `await` on synchronous `userPreferences.getBool` in `getUsersPresence`Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởtype: feature
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
RocketChat/Rocket.Chat.ReactNative#7737 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
UIKit modal: a viewSubmit response with no `type` field fails to close the modal on mobile (regression from #7057)Có thể đã có người làm @erikurt9 đã nhận 106 ngày trước. Đang mởtype: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
RocketChat/Rocket.Chat.ReactNative#7503 · 3 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
type: bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
RocketChat/Rocket.Chat.ReactNative#7437 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
✅ tests 👷 ci type: feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
RocketChat/Rocket.Chat.ReactNative#7247 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: goRoom navigates to broken RoomView after failed DM creation from searchCó thể đã có người làm @deepak0x đã nhận 216 ngày trước. Đang mởtype: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
RocketChat/Rocket.Chat.ReactNative#7098 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của RocketChat/Rocket.Chat.ReactNative
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
langchain-ai/langchainjs#12239 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Board view: the Monitoring column is always empty because compact issue rows drop displayStatusĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
paperclipai/paperclip#21837 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
code-yeongyu/senpi#6813 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 93/100
lingdojo/kana-dojo#34169 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100