{"action":"created","issue":{"url":"https://api.github.com/repos/mattermost/mattermost-mobile/issues/2292","repository_url":"https://api.github.com/repos/mattermost/mattermost-mobile","labels_url":"https://api.github.com/repos/mattermost/mattermost-mobile/issues/2292/labels{/name}","comments_url":"https://api.github.com/repos/mattermost/mattermost-mobile/issues/2292/comments","events_url":"https://api.github.com/repos/mattermost/mattermost-mobile/issues/2292/events","html_url":"https://github.com/mattermost/mattermost-mobile/pull/2292","id":375461446,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2OTAwMTU3","number":2292,"title":"iOS clear notifications from a specific channel when clear PN","user":{"login":"enahum","id":6757047,"node_id":"MDQ6VXNlcjY3NTcwNDc=","avatar_url":"https://avatars1.githubusercontent.com/u/6757047?v=4","gravatar_id":"","url":"https://api.github.com/users/enahum","html_url":"https://github.com/enahum","followers_url":"https://api.github.com/users/enahum/followers","following_url":"https://api.github.com/users/enahum/following{/other_user}","gists_url":"https://api.github.com/users/enahum/gists{/gist_id}","starred_url":"https://api.github.com/users/enahum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enahum/subscriptions","organizations_url":"https://api.github.com/users/enahum/orgs","repos_url":"https://api.github.com/users/enahum/repos","events_url":"https://api.github.com/users/enahum/events{/privacy}","received_events_url":"https://api.github.com/users/enahum/received_events","type":"User","site_admin":false},"labels":[{"id":460355259,"node_id":"MDU6TGFiZWw0NjAzNTUyNTk=","url":"https://api.github.com/repos/mattermost/mattermost-mobile/labels/1:%20Needs%20testing","name":"1: Needs testing","color":"5444a3","default":false},{"id":460355330,"node_id":"MDU6TGFiZWw0NjAzNTUzMzA=","url":"https://api.github.com/repos/mattermost/mattermost-mobile/labels/2:%20Dev%20Review","name":"2: Dev Review","color":"eb6420","default":false},{"id":827720692,"node_id":"MDU6TGFiZWw4Mjc3MjA2OTI=","url":"https://api.github.com/repos/mattermost/mattermost-mobile/labels/2:%20PM%20Review","name":"2: PM Review","color":"006b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/mattermost/mattermost-mobile/milestones/15","html_url":"https://github.com/mattermost/mattermost-mobile/milestone/15","labels_url":"https://api.github.com/repos/mattermost/mattermost-mobile/milestones/15/labels","id":3696667,"node_id":"MDk6TWlsZXN0b25lMzY5NjY2Nw==","number":15,"title":"1.15","description":"","creator":{"login":"cpanato","id":4115580,"node_id":"MDQ6VXNlcjQxMTU1ODA=","avatar_url":"https://avatars2.githubusercontent.com/u/4115580?v=4","gravatar_id":"","url":"https://api.github.com/users/cpanato","html_url":"https://github.com/cpanato","followers_url":"https://api.github.com/users/cpanato/followers","following_url":"https://api.github.com/users/cpanato/following{/other_user}","gists_url":"https://api.github.com/users/cpanato/gists{/gist_id}","starred_url":"https://api.github.com/users/cpanato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpanato/subscriptions","organizations_url":"https://api.github.com/users/cpanato/orgs","repos_url":"https://api.github.com/users/cpanato/repos","events_url":"https://api.github.com/users/cpanato/events{/privacy}","received_events_url":"https://api.github.com/users/cpanato/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":5,"state":"open","created_at":"2018-09-28T13:49:30Z","updated_at":"2018-10-30T12:22:20Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2018-10-30T12:22:20Z","updated_at":"2018-10-31T20:43:56Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/mattermost/mattermost-mobile/pulls/2292","html_url":"https://github.com/mattermost/mattermost-mobile/pull/2292","diff_url":"https://github.com/mattermost/mattermost-mobile/pull/2292.diff","patch_url":"https://github.com/mattermost/mattermost-mobile/pull/2292.patch"},"body":"#### Summary\r\non iOS when the device receives a Clear push notification or when switching to a channel in the app that has notifications and even when bringing the app from the background it will remove all the push notifications that belong to that channel from the *NotificationCenter*.\r\n\r\nCaveats: \r\n* If the app is fully closed (was killed) the OS won't deliver the notification to the app to be processed and will be processed by the OS thus the clear notification **won't** remove the notifications from the *NotificationCenter*. from the apple's doc:\r\n\r\n> Discussion\r\nUse this method to process incoming remote notifications for your app. Unlike the application:didReceiveRemoteNotification: method, which is called only when your app is running in the foreground, the system calls this method when your app is running in the foreground or background. In addition, if you enabled the remote notifications background mode, the system launches your app (or wakes it from the suspended state) and puts it in the background state when a remote notification arrives. However, the system does not automatically launch your app if the user has force-quit it. In that situation, the user must relaunch your app or restart the device before the system attempts to launch your app automatically again.\r\n\r\n* Replying to a notification will cause the badge count to get out of sync:\r\nWhen replying the badge count decreases by one and leaves the rest of the notifications for that channel intact BUT it marks the channel as read so the next push notification will have a badge number with the total of unread mentions that by this point exclude the previous ones in that channel. (the same will happen if we don't mark the channel as read, the proper way to fix this is to have read indication per posts)\r\n\r\n------\r\nThis PR should be tested and for that the changes in the push proxy needs to be deployed\r\n\r\n#### Ticket Link\r\nhttps://mattermost.atlassian.net/browse/MM-12534\r\n\r\n#### Checklist\r\n[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]\r\n- [x] Include changes to [mattermost-push-proxy](https://github.com/mattermost/mattermost-push-proxy) (https://github.com/mattermost/mattermost-push-proxy/pull/36)\r\n\r\n#### Device Information\r\nThis PR was tested on: iOS 12"},"comment":{"url":"https://api.github.com/repos/mattermost/mattermost-mobile/issues/comments/434840974","html_url":"https://github.com/mattermost/mattermost-mobile/pull/2292#issuecomment-434840974","issue_url":"https://api.github.com/repos/mattermost/mattermost-mobile/issues/2292","id":434840974,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDg0MDk3NA==","user":{"login":"enahum","id":6757047,"node_id":"MDQ6VXNlcjY3NTcwNDc=","avatar_url":"https://avatars1.githubusercontent.com/u/6757047?v=4","gravatar_id":"","url":"https://api.github.com/users/enahum","html_url":"https://github.com/enahum","followers_url":"https://api.github.com/users/enahum/followers","following_url":"https://api.github.com/users/enahum/following{/other_user}","gists_url":"https://api.github.com/users/enahum/gists{/gist_id}","starred_url":"https://api.github.com/users/enahum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enahum/subscriptions","organizations_url":"https://api.github.com/users/enahum/orgs","repos_url":"https://api.github.com/users/enahum/repos","events_url":"https://api.github.com/users/enahum/events{/privacy}","received_events_url":"https://api.github.com/users/enahum/received_events","type":"User","site_admin":false},"created_at":"2018-10-31T20:43:56Z","updated_at":"2018-10-31T20:43:56Z","author_association":"MEMBER","body":"@hmhealey changes made"}}
{"actor":{"display_login":"enahum"}}