{"action":"created","issue":{"url":"https://api.github.com/repos/status-im/status-react/issues/6893","repository_url":"https://api.github.com/repos/status-im/status-react","labels_url":"https://api.github.com/repos/status-im/status-react/issues/6893/labels{/name}","comments_url":"https://api.github.com/repos/status-im/status-react/issues/6893/comments","events_url":"https://api.github.com/repos/status-im/status-react/issues/6893/events","html_url":"https://github.com/status-im/status-react/pull/6893","id":384714728,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzODQ4NDk3","number":6893,"title":"Fix PN metadata leak","user":{"login":"PombeirP","id":138074,"node_id":"MDQ6VXNlcjEzODA3NA==","avatar_url":"https://avatars1.githubusercontent.com/u/138074?v=4","gravatar_id":"","url":"https://api.github.com/users/PombeirP","html_url":"https://github.com/PombeirP","followers_url":"https://api.github.com/users/PombeirP/followers","following_url":"https://api.github.com/users/PombeirP/following{/other_user}","gists_url":"https://api.github.com/users/PombeirP/gists{/gist_id}","starred_url":"https://api.github.com/users/PombeirP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PombeirP/subscriptions","organizations_url":"https://api.github.com/users/PombeirP/orgs","repos_url":"https://api.github.com/users/PombeirP/repos","events_url":"https://api.github.com/users/PombeirP/events{/privacy}","received_events_url":"https://api.github.com/users/PombeirP/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"PombeirP","id":138074,"node_id":"MDQ6VXNlcjEzODA3NA==","avatar_url":"https://avatars1.githubusercontent.com/u/138074?v=4","gravatar_id":"","url":"https://api.github.com/users/PombeirP","html_url":"https://github.com/PombeirP","followers_url":"https://api.github.com/users/PombeirP/followers","following_url":"https://api.github.com/users/PombeirP/following{/other_user}","gists_url":"https://api.github.com/users/PombeirP/gists{/gist_id}","starred_url":"https://api.github.com/users/PombeirP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PombeirP/subscriptions","organizations_url":"https://api.github.com/users/PombeirP/orgs","repos_url":"https://api.github.com/users/PombeirP/repos","events_url":"https://api.github.com/users/PombeirP/events{/privacy}","received_events_url":"https://api.github.com/users/PombeirP/received_events","type":"User","site_admin":false},"assignees":[{"login":"PombeirP","id":138074,"node_id":"MDQ6VXNlcjEzODA3NA==","avatar_url":"https://avatars1.githubusercontent.com/u/138074?v=4","gravatar_id":"","url":"https://api.github.com/users/PombeirP","html_url":"https://github.com/PombeirP","followers_url":"https://api.github.com/users/PombeirP/followers","following_url":"https://api.github.com/users/PombeirP/following{/other_user}","gists_url":"https://api.github.com/users/PombeirP/gists{/gist_id}","starred_url":"https://api.github.com/users/PombeirP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PombeirP/subscriptions","organizations_url":"https://api.github.com/users/PombeirP/orgs","repos_url":"https://api.github.com/users/PombeirP/repos","events_url":"https://api.github.com/users/PombeirP/events{/privacy}","received_events_url":"https://api.github.com/users/PombeirP/received_events","type":"User","site_admin":false}],"milestone":null,"comments":21,"created_at":"2018-11-27T10:06:11Z","updated_at":"2018-12-05T15:31:48Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/status-im/status-react/pulls/6893","html_url":"https://github.com/status-im/status-react/pull/6893","diff_url":"https://github.com/status-im/status-react/pull/6893.diff","patch_url":"https://github.com/status-im/status-react/pull/6893.patch"},"body":"[comment]: # (Please replace ... with your information. Remove < and >)\r\n[comment]: # (To auto-close issue on merge, please insert the related issue number after # i.e fixes #566)\r\n\r\nfixes #6772, #3488, depends on https://github.com/status-im/status-go/pull/1297\r\n\r\n### Summary:\r\n\r\n[comment]: # (Summarise the problem and how the pull request solves it)\r\n\r\nThis PR:\r\n- [x] ~~Moves to using sender/receiver pubkey hashes instead of the pubkeys themselves~~\r\n- [x] Moves from Notification API (where title/body were being sent with the PN) to Messaging API (Messaging API only sends a hidden message with key/value pairs)\r\n  - [x] Key/values sent: `msg/from`, `msg/to`~~, `msg/id-hash`~~\r\n- [x] Maintains compatibility with older clients (receiving only, sent PNs are not displayed on older clients)\r\n- [x] Creates background task to receive FCM message and display appropriate PN\r\n  - [x] ~~Only create PN if message with hash equal to `message-hash` is not marked as seen~~\r\n- [x] Removes unused `config/in-app-notifications-enabled?`/`IN_APP_NOTIFICATIONS_ENABLED`\r\n- [x] ~~Removes dependency on NotifyUsers status-go API by leveraging react-native-firebase API~~ the API does not support some critical properties for Android and iOS, so we must continue with the implemenation in status-go for the time being. Created suggestion at https://boards.invertase.io/react-native-firebase/p/add-missing-properties-to-messagingremotemessage.\r\n\r\n### Review notes (optional):\r\n<!-- (Specify if something in particular should be looked at, or ignored, during review) -->\r\n\r\nThis PR paves the way to fix issues like https://github.com/status-im/status-react/issues/3488, https://github.com/status-im/status-react/issues/3487, https://github.com/status-im/status-react/issues/2984\r\n\r\n### Testing notes (optional):\r\n<!-- (Specify which platforms should be tested) -->\r\n#### Platforms\r\nCheck that new apps can receive PNs from both new and old clients. I've tested Desktop and Android, but not iOS.\r\n- Android (as sender/receiver)\r\n- iOS (as sender/receiver)\r\n- Desktop (as sender only)\r\n\r\nSee here for expected behavior from technical perspective: https://github.com/invertase/react-native-firebase-docs/blob/master/docs/messaging/introduction.md#data-only-messages\r\n\r\n<!-- (Specify if some specific areas has to be tested, for example 1-1 chats) -->\r\n#### Areas that maybe impacted\r\n**Functional**\r\n- 1-1 chats\r\n- group chats\r\n\r\n<!-- (Specify exact steps to test if there are such) -->\r\n### Steps to test:\r\n1. Open Status on device 1\r\n1. Open Status on device 2\r\n1. Add device 2 as a contact on device 1\r\n1. Send a message from device 1 to device 2\r\n1. Add device 1 as a contact of device 2\r\n1. Put the app on device 2 in the background\r\n1. Send another message from device 1 to device 2\r\n1. Confirm that a Push Notification is displayed on device 2\r\n1. Tap on the PN\r\n1. Confirm that the app navigates to the appropriate chat\r\n\r\n<!-- (PRs will only be accepted if squashed into single commit.) -->\r\n\r\nstatus: ready <!-- Can be ready or wip -->\r\n"},"comment":{"url":"https://api.github.com/repos/status-im/status-react/issues/comments/444526750","html_url":"https://github.com/status-im/status-react/pull/6893#issuecomment-444526750","issue_url":"https://api.github.com/repos/status-im/status-react/issues/6893","id":444526750,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NDUyNjc1MA==","user":{"login":"cammellos","id":1017008,"node_id":"MDQ6VXNlcjEwMTcwMDg=","avatar_url":"https://avatars0.githubusercontent.com/u/1017008?v=4","gravatar_id":"","url":"https://api.github.com/users/cammellos","html_url":"https://github.com/cammellos","followers_url":"https://api.github.com/users/cammellos/followers","following_url":"https://api.github.com/users/cammellos/following{/other_user}","gists_url":"https://api.github.com/users/cammellos/gists{/gist_id}","starred_url":"https://api.github.com/users/cammellos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cammellos/subscriptions","organizations_url":"https://api.github.com/users/cammellos/orgs","repos_url":"https://api.github.com/users/cammellos/repos","events_url":"https://api.github.com/users/cammellos/events{/privacy}","received_events_url":"https://api.github.com/users/cammellos/received_events","type":"User","site_admin":false},"created_at":"2018-12-05T15:31:48Z","updated_at":"2018-12-05T15:31:48Z","author_association":"MEMBER","body":"It has not been added to `runner.cljs`, we need an entry there for the test to run"}}
{"actor":{"display_login":"cammellos"}}