fix(push): Route contact request pushes to Activity Center#7536
Conversation
|
|
@siddarthkay Is there any easy way to test this? It's an update for the PN servers as well |
Jenkins BuildsClick to see older builds (6)
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release/10.34.x #7536 +/- ##
==================================================
Coverage ? 61.30%
==================================================
Files ? 850
Lines ? 119105
Branches ? 0
==================================================
Hits ? 73012
Misses ? 38629
Partials ? 7464
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Add a dedicated contact request push notification type and classify contact request messages with it before sending remote push notifications. Map contact request APNS payloads to `status-app://contact-requests` so tapping the notification opens the Activity Center Contact requests group instead of the chats list. Also add server-side filtering for blocked contact request authors and cover the new mapping in push notification tests. Part of status-app issue #21189
There was a problem hiding this comment.
Pull request overview
This PR introduces a dedicated contact request remote push notification type so contact request messages can be classified distinctly from normal chat messages, enabling correct deep-link routing (Activity Center → Contact Requests) and server-side filtering for blocked authors.
Changes:
- Add
CONTACT_REQUESTtoPushNotificationTypeand set this type when sending remote push notifications forChatMessage_CONTACT_REQUEST. - Map APNS payloads for contact requests to
status-app://contact-requestsand use a dedicated notification text. - Filter contact request pushes server-side when the author is blocked, and extend unit/functional test coverage for the new type/mapping.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
tests-functional/tests/test_push_notification_server.py |
Updates functional push expectation to assert the new contact-request push message text. |
protocol/pushnotificationserver/server.go |
Adds contact-request type recognition and filtering (blocked author). |
protocol/pushnotificationserver/server_test.go |
Extends report-building tests for valid/blocked contact-request notifications. |
protocol/pushnotificationserver/gorush.go |
Adds contact-request notification text and APNS deep-link mapping to status-app://contact-requests. |
protocol/pushnotificationserver/gorush_test.go |
Adds unit test coverage for contact-request text and deep-link mapping. |
protocol/pushnotificationclient/client.go |
Classifies outgoing contact request messages as PushNotification_CONTACT_REQUEST. |
protocol/protobuf/push_notifications.proto |
Adds CONTACT_REQUEST = 4 to PushNotificationType. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
Add a dedicated contact request push notification type and classify contact request messages with it before sending remote push notifications.
Map contact request APNS payloads to
status-app://contact-requestsso tapping the notification opens the Activity Center Contact requests group instead of the chats list. Also add server-side filtering for blocked contact request authors and cover the new mapping in push notification tests.Closes
status-appPR: status-im/status-app#21189