feature: Add "Mark as Read" action button to push notifications
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- android, ios, react-native, swift, typescript
- Ambito
- mobile, mobile-dev
Direzione di ricerca
Inizia da app/lib/notifications/push.ts e ios/ReplyNotification.swift, quindi esamina l’handler REPLY_ACTION esistente e app/lib/methods/readMessages.ts per l’utilizzo dell’API subscriptions.read. Traccia il modo in cui i payload delle notifiche forniscono rid e il modo in cui le azioni in primo piano e in background vengono gestite su entrambe le piattaforme. Il lavoro è completato quando un’azione Mark as Read chiama subscriptions.read, cancella la notifica della room e lo stato di non lettura e funziona in primo piano e in background.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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 !!
- Lingua principale
- TypeScript
- Stelle
- 2.4k
- Fork
- 1.5k
- Merge medio
- 1g 15h
- PR unite (30g)
- 29
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di RocketChat/Rocket.Chat.ReactNative
-
[IMPROVEMENT] Remove redundant `await` on synchronous `userPreferences.getBool` in `getUsersPresence`Forse già presa Una pull request collegata a questa issue è aperta o già unita. Apertatype: feature
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
RocketChat/Rocket.Chat.ReactNative#7737 ·
I maintainer di solito rispondono entro 1 giorno
-
UIKit modal: a viewSubmit response with no `type` field fails to close the modal on mobile (regression from #7057)Forse già presa @erikurt9 l’ha presa 106 giorni fa. Apertatype: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
RocketChat/Rocket.Chat.ReactNative#7503 · 3 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
type: bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
RocketChat/Rocket.Chat.ReactNative#7437 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
✅ tests 👷 ci type: feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
RocketChat/Rocket.Chat.ReactNative#7247 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug: goRoom navigates to broken RoomView after failed DM creation from searchForse già presa @deepak0x l’ha presa 216 giorni fa. Apertatype: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
RocketChat/Rocket.Chat.ReactNative#7098 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di RocketChat/Rocket.Chat.ReactNative
Issue simili
-
Bug: Broken RTL / BiDi text rendering when mixing Persian (Farsi) with English or numbersForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug
Difficoltà 2/5 Mezza giornata Idoneità per principianti 68/100
amosblomqvist/learnharness#758 ·
I maintainer di solito rispondono entro 2 giorni
-
Change WorkspacesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
bitfocus/companion-module-renewedvision-propresenter-api#134 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
rcpch/digital-growth-charts-react-component-library#304 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
dsh-market/dsh-market#1210 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
trustjonathan/STUDY-HUB#13 ·