{"action":"created","comment":{"url":"https://api.github.com/repos/keybase/client/pulls/comments/199913968","pull_request_review_id":134126069,"id":199913968,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTkxMzk2OA==","diff_hunk":"@@ -223,21 +223,26 @@ - (void)application:(UIApplication *)application didReceiveRemoteNotification:(N\n   NSString* body = notification[@\"m\"];\n   if (type != nil && body != nil) {\n     dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void){\n-      NSLog(@\"Remote notification handle for %@ started...\", type);\n       NSError* err = nil;\n       int membersType = [notification[@\"t\"] intValue];\n       if ([type isEqualToString:@\"chat.newmessageSilent_2\"]) {\n         NSString* convID = notification[@\"c\"];\n-        int messageID = [notification[@\"d\"] intValue];\n-        NSString* pushID = [notification[@\"p\"] objectAtIndex:0];\n-        int badgeCount = [notification[@\"b\"] intValue];\n-        int unixTime = [notification[@\"x\"] intValue];\n-        NSString* soundName = notification[@\"s\"];\n-        PushNotifier* pusher = [[PushNotifier alloc] init];\n-        KeybaseHandleBackgroundNotification(convID, membersType, messageID, pushID, badgeCount, unixTime, body, soundName, pusher, &err);\n+        NSString* msg = nil;\n+        msg = KeybaseUnboxNotification(convID, membersType, body, &err);\n+        // If d is set, display the plaintext notification\n+        bool displayPlaintext = notification[@\"n\"];","path":"shared/react-native/ios/Keybase/AppDelegate.m","position":19,"original_position":19,"commit_id":"51b64566af4745f37bb23cb9ac7a7defc9f0665e","original_commit_id":"51b64566af4745f37bb23cb9ac7a7defc9f0665e","user":{"login":"mmaxim","id":1250314,"node_id":"MDQ6VXNlcjEyNTAzMTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1250314?v=4","gravatar_id":"","url":"https://api.github.com/users/mmaxim","html_url":"https://github.com/mmaxim","followers_url":"https://api.github.com/users/mmaxim/followers","following_url":"https://api.github.com/users/mmaxim/following{/other_user}","gists_url":"https://api.github.com/users/mmaxim/gists{/gist_id}","starred_url":"https://api.github.com/users/mmaxim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmaxim/subscriptions","organizations_url":"https://api.github.com/users/mmaxim/orgs","repos_url":"https://api.github.com/users/mmaxim/repos","events_url":"https://api.github.com/users/mmaxim/events{/privacy}","received_events_url":"https://api.github.com/users/mmaxim/received_events","type":"User","site_admin":false},"body":"Think this needs to be ` [notification[@\"m\"] boolValue]`","created_at":"2018-07-03T18:44:03Z","updated_at":"2018-07-03T18:44:03Z","html_url":"https://github.com/keybase/client/pull/12644#discussion_r199913968","pull_request_url":"https://api.github.com/repos/keybase/client/pulls/12644","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/keybase/client/pulls/comments/199913968"},"html":{"href":"https://github.com/keybase/client/pull/12644#discussion_r199913968"},"pull_request":{"href":"https://api.github.com/repos/keybase/client/pulls/12644"}}},"pull_request":{"url":"https://api.github.com/repos/keybase/client/pulls/12644","id":198745019,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4NzQ1MDE5","html_url":"https://github.com/keybase/client/pull/12644","diff_url":"https://github.com/keybase/client/pull/12644.diff","patch_url":"https://github.com/keybase/client/pull/12644.patch","issue_url":"https://api.github.com/repos/keybase/client/issues/12644","number":12644,"state":"open","locked":false,"title":"Unbox notifications in the background","user":{"login":"joshblum","id":1144020,"node_id":"MDQ6VXNlcjExNDQwMjA=","avatar_url":"https://avatars0.githubusercontent.com/u/1144020?v=4","gravatar_id":"","url":"https://api.github.com/users/joshblum","html_url":"https://github.com/joshblum","followers_url":"https://api.github.com/users/joshblum/followers","following_url":"https://api.github.com/users/joshblum/following{/other_user}","gists_url":"https://api.github.com/users/joshblum/gists{/gist_id}","starred_url":"https://api.github.com/users/joshblum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshblum/subscriptions","organizations_url":"https://api.github.com/users/joshblum/orgs","repos_url":"https://api.github.com/users/joshblum/repos","events_url":"https://api.github.com/users/joshblum/events{/privacy}","received_events_url":"https://api.github.com/users/joshblum/received_events","type":"User","site_admin":false},"body":"Boxed messages are attached to both regular and silent notifications now. We always attempt to unbox the silent notification in the background, if the user has enabled plaintext notifications we also display the unboxed message. If we've attached the boxed message to the regular notification we also attempt unboxing when the user selects the notification. the aim is to fill the user's cache as aggressively as possible.","created_at":"2018-07-02T17:34:52Z","updated_at":"2018-07-03T18:44:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e2017eed04bc3c4c120260b73e9d7db96783f61b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/keybase/client/pulls/12644/commits","review_comments_url":"https://api.github.com/repos/keybase/client/pulls/12644/comments","review_comment_url":"https://api.github.com/repos/keybase/client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/keybase/client/issues/12644/comments","statuses_url":"https://api.github.com/repos/keybase/client/statuses/51b64566af4745f37bb23cb9ac7a7defc9f0665e","head":{"label":"keybase:joshblum/android-notif-CORE-8205","ref":"joshblum/android-notif-CORE-8205","sha":"51b64566af4745f37bb23cb9ac7a7defc9f0665e","user":{"login":"keybase","id":5400834,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MDA4MzQ=","avatar_url":"https://avatars2.githubusercontent.com/u/5400834?v=4","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"repo":{"id":29099181,"node_id":"MDEwOlJlcG9zaXRvcnkyOTA5OTE4MQ==","name":"client","full_name":"keybase/client","owner":{"login":"keybase","id":5400834,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MDA4MzQ=","avatar_url":"https://avatars2.githubusercontent.com/u/5400834?v=4","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/keybase/client","description":"Keybase Go Library, Client, Service, OS X, iOS, Android, Electron","fork":false,"url":"https://api.github.com/repos/keybase/client","forks_url":"https://api.github.com/repos/keybase/client/forks","keys_url":"https://api.github.com/repos/keybase/client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keybase/client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keybase/client/teams","hooks_url":"https://api.github.com/repos/keybase/client/hooks","issue_events_url":"https://api.github.com/repos/keybase/client/issues/events{/number}","events_url":"https://api.github.com/repos/keybase/client/events","assignees_url":"https://api.github.com/repos/keybase/client/assignees{/user}","branches_url":"https://api.github.com/repos/keybase/client/branches{/branch}","tags_url":"https://api.github.com/repos/keybase/client/tags","blobs_url":"https://api.github.com/repos/keybase/client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keybase/client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keybase/client/git/refs{/sha}","trees_url":"https://api.github.com/repos/keybase/client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keybase/client/statuses/{sha}","languages_url":"https://api.github.com/repos/keybase/client/languages","stargazers_url":"https://api.github.com/repos/keybase/client/stargazers","contributors_url":"https://api.github.com/repos/keybase/client/contributors","subscribers_url":"https://api.github.com/repos/keybase/client/subscribers","subscription_url":"https://api.github.com/repos/keybase/client/subscription","commits_url":"https://api.github.com/repos/keybase/client/commits{/sha}","git_commits_url":"https://api.github.com/repos/keybase/client/git/commits{/sha}","comments_url":"https://api.github.com/repos/keybase/client/comments{/number}","issue_comment_url":"https://api.github.com/repos/keybase/client/issues/comments{/number}","contents_url":"https://api.github.com/repos/keybase/client/contents/{+path}","compare_url":"https://api.github.com/repos/keybase/client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keybase/client/merges","archive_url":"https://api.github.com/repos/keybase/client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keybase/client/downloads","issues_url":"https://api.github.com/repos/keybase/client/issues{/number}","pulls_url":"https://api.github.com/repos/keybase/client/pulls{/number}","milestones_url":"https://api.github.com/repos/keybase/client/milestones{/number}","notifications_url":"https://api.github.com/repos/keybase/client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keybase/client/labels{/name}","releases_url":"https://api.github.com/repos/keybase/client/releases{/id}","deployments_url":"https://api.github.com/repos/keybase/client/deployments","created_at":"2015-01-11T17:17:12Z","updated_at":"2018-07-03T18:09:40Z","pushed_at":"2018-07-03T18:33:36Z","git_url":"git://github.com/keybase/client.git","ssh_url":"git@github.com:keybase/client.git","clone_url":"https://github.com/keybase/client.git","svn_url":"https://github.com/keybase/client","homepage":"","size":244396,"stargazers_count":3805,"watchers_count":3805,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":364,"mirror_url":null,"archived":false,"open_issues_count":2183,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":364,"open_issues":2183,"watchers":3805,"default_branch":"master"}},"base":{"label":"keybase:master","ref":"master","sha":"47925813f14d5499084addf767c03fd23b8fcbb0","user":{"login":"keybase","id":5400834,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MDA4MzQ=","avatar_url":"https://avatars2.githubusercontent.com/u/5400834?v=4","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"repo":{"id":29099181,"node_id":"MDEwOlJlcG9zaXRvcnkyOTA5OTE4MQ==","name":"client","full_name":"keybase/client","owner":{"login":"keybase","id":5400834,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MDA4MzQ=","avatar_url":"https://avatars2.githubusercontent.com/u/5400834?v=4","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/keybase/client","description":"Keybase Go Library, Client, Service, OS X, iOS, Android, Electron","fork":false,"url":"https://api.github.com/repos/keybase/client","forks_url":"https://api.github.com/repos/keybase/client/forks","keys_url":"https://api.github.com/repos/keybase/client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keybase/client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keybase/client/teams","hooks_url":"https://api.github.com/repos/keybase/client/hooks","issue_events_url":"https://api.github.com/repos/keybase/client/issues/events{/number}","events_url":"https://api.github.com/repos/keybase/client/events","assignees_url":"https://api.github.com/repos/keybase/client/assignees{/user}","branches_url":"https://api.github.com/repos/keybase/client/branches{/branch}","tags_url":"https://api.github.com/repos/keybase/client/tags","blobs_url":"https://api.github.com/repos/keybase/client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keybase/client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keybase/client/git/refs{/sha}","trees_url":"https://api.github.com/repos/keybase/client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keybase/client/statuses/{sha}","languages_url":"https://api.github.com/repos/keybase/client/languages","stargazers_url":"https://api.github.com/repos/keybase/client/stargazers","contributors_url":"https://api.github.com/repos/keybase/client/contributors","subscribers_url":"https://api.github.com/repos/keybase/client/subscribers","subscription_url":"https://api.github.com/repos/keybase/client/subscription","commits_url":"https://api.github.com/repos/keybase/client/commits{/sha}","git_commits_url":"https://api.github.com/repos/keybase/client/git/commits{/sha}","comments_url":"https://api.github.com/repos/keybase/client/comments{/number}","issue_comment_url":"https://api.github.com/repos/keybase/client/issues/comments{/number}","contents_url":"https://api.github.com/repos/keybase/client/contents/{+path}","compare_url":"https://api.github.com/repos/keybase/client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keybase/client/merges","archive_url":"https://api.github.com/repos/keybase/client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keybase/client/downloads","issues_url":"https://api.github.com/repos/keybase/client/issues{/number}","pulls_url":"https://api.github.com/repos/keybase/client/pulls{/number}","milestones_url":"https://api.github.com/repos/keybase/client/milestones{/number}","notifications_url":"https://api.github.com/repos/keybase/client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keybase/client/labels{/name}","releases_url":"https://api.github.com/repos/keybase/client/releases{/id}","deployments_url":"https://api.github.com/repos/keybase/client/deployments","created_at":"2015-01-11T17:17:12Z","updated_at":"2018-07-03T18:09:40Z","pushed_at":"2018-07-03T18:33:36Z","git_url":"git://github.com/keybase/client.git","ssh_url":"git@github.com:keybase/client.git","clone_url":"https://github.com/keybase/client.git","svn_url":"https://github.com/keybase/client","homepage":"","size":244396,"stargazers_count":3805,"watchers_count":3805,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":364,"mirror_url":null,"archived":false,"open_issues_count":2183,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":364,"open_issues":2183,"watchers":3805,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/keybase/client/pulls/12644"},"html":{"href":"https://github.com/keybase/client/pull/12644"},"issue":{"href":"https://api.github.com/repos/keybase/client/issues/12644"},"comments":{"href":"https://api.github.com/repos/keybase/client/issues/12644/comments"},"review_comments":{"href":"https://api.github.com/repos/keybase/client/pulls/12644/comments"},"review_comment":{"href":"https://api.github.com/repos/keybase/client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/keybase/client/pulls/12644/commits"},"statuses":{"href":"https://api.github.com/repos/keybase/client/statuses/51b64566af4745f37bb23cb9ac7a7defc9f0665e"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"mmaxim"}}