{"action":"created","comment":{"url":"https://api.github.com/repos/StepicOrg/stepik-ios/pulls/comments/225507238","pull_request_review_id":165119135,"id":225507238,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNTUwNzIzOA==","diff_hunk":"@@ -0,0 +1,44 @@\n+//\n+//  NotificationsDefaultsContainer.swift\n+//  Stepic\n+//\n+//  Created by Ivan Magda on 15/10/2018.\n+//  Copyright © 2018 Alex Karpov. All rights reserved.\n+//\n+\n+import Foundation\n+\n+final class NotificationsDefaultsContainer {\n+    private let defaults = UserDefaults.standard\n+\n+    private let didMigrateLocalNotificationsKey = \"didMigrateLocalNotificationsKey\"\n+    private let localNotificationsVersionKey = \"localNotificationsVersionKey\"\n+\n+    var didMigrateLocalNotifications: Bool {\n+        get {\n+            if let did = defaults.value(forKey: didMigrateLocalNotificationsKey) as? Bool {\n+                return did\n+            } else {\n+                return false\n+            }\n+        }\n+        set {\n+            defaults.set(newValue, forKey: didMigrateLocalNotificationsKey)\n+            defaults.synchronize()","path":"Stepic/NotificationsDefaultsContainer.swift","position":27,"original_position":27,"commit_id":"2cbaca719fb6802f36647a1a8fd3ecafeb613df2","original_commit_id":"2cbaca719fb6802f36647a1a8fd3ecafeb613df2","user":{"login":"kvld","id":1695403,"node_id":"MDQ6VXNlcjE2OTU0MDM=","avatar_url":"https://avatars0.githubusercontent.com/u/1695403?v=4","gravatar_id":"","url":"https://api.github.com/users/kvld","html_url":"https://github.com/kvld","followers_url":"https://api.github.com/users/kvld/followers","following_url":"https://api.github.com/users/kvld/following{/other_user}","gists_url":"https://api.github.com/users/kvld/gists{/gist_id}","starred_url":"https://api.github.com/users/kvld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvld/subscriptions","organizations_url":"https://api.github.com/users/kvld/orgs","repos_url":"https://api.github.com/users/kvld/repos","events_url":"https://api.github.com/users/kvld/events{/privacy}","received_events_url":"https://api.github.com/users/kvld/received_events","type":"User","site_admin":false},"body":"https://developer.apple.com/documentation/foundation/userdefaults/1414005-synchronize\r\n> this method is unnecessary and shouldn't be used.","created_at":"2018-10-16T11:56:08Z","updated_at":"2018-10-16T11:56:08Z","html_url":"https://github.com/StepicOrg/stepik-ios/pull/382#discussion_r225507238","pull_request_url":"https://api.github.com/repos/StepicOrg/stepik-ios/pulls/382","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/StepicOrg/stepik-ios/pulls/comments/225507238"},"html":{"href":"https://github.com/StepicOrg/stepik-ios/pull/382#discussion_r225507238"},"pull_request":{"href":"https://api.github.com/repos/StepicOrg/stepik-ios/pulls/382"}}},"pull_request":{"url":"https://api.github.com/repos/StepicOrg/stepik-ios/pulls/382","id":222839276,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyODM5Mjc2","html_url":"https://github.com/StepicOrg/stepik-ios/pull/382","diff_url":"https://github.com/StepicOrg/stepik-ios/pull/382.diff","patch_url":"https://github.com/StepicOrg/stepik-ios/pull/382.patch","issue_url":"https://api.github.com/repos/StepicOrg/stepik-ios/issues/382","number":382,"state":"open","locked":false,"title":"Notifications service","user":{"login":"vanyaland","id":8586063,"node_id":"MDQ6VXNlcjg1ODYwNjM=","avatar_url":"https://avatars0.githubusercontent.com/u/8586063?v=4","gravatar_id":"","url":"https://api.github.com/users/vanyaland","html_url":"https://github.com/vanyaland","followers_url":"https://api.github.com/users/vanyaland/followers","following_url":"https://api.github.com/users/vanyaland/following{/other_user}","gists_url":"https://api.github.com/users/vanyaland/gists{/gist_id}","starred_url":"https://api.github.com/users/vanyaland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanyaland/subscriptions","organizations_url":"https://api.github.com/users/vanyaland/orgs","repos_url":"https://api.github.com/users/vanyaland/repos","events_url":"https://api.github.com/users/vanyaland/events{/privacy}","received_events_url":"https://api.github.com/users/vanyaland/received_events","type":"User","site_admin":false},"body":"**Задача**: [#APPS-2013](https://vyahhi.myjetbrains.com/youtrack/issue/APPS-2013)\r\n\r\n**Описание**:\r\nОткрытие пушей и локальных нотификаций с разделением на типы и соответствующим роутингом контролируется в одном месте `NotificationsService`.\r\nПоддержка локальных уведомлений до iOS 10.0 и выше, используя `LocalNotificationsService`.\r\n\r\n**TODO**:\r\n- [x] Achivement\r\n- [x] Personal deadline\r\n- [x] Streak\r\n- [x] Learn\r\n- [x] Comment\r\n- [x] Review\r\n- [x] Teach\r\n- [x] Default\r\n- [x] Browser reminder (больше не поддерживается)","created_at":"2018-10-15T09:32:09Z","updated_at":"2018-10-16T11:56:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"55702440afcc04aa207938253e160907b72db345","assignee":{"login":"vanyaland","id":8586063,"node_id":"MDQ6VXNlcjg1ODYwNjM=","avatar_url":"https://avatars0.githubusercontent.com/u/8586063?v=4","gravatar_id":"","url":"https://api.github.com/users/vanyaland","html_url":"https://github.com/vanyaland","followers_url":"https://api.github.com/users/vanyaland/followers","following_url":"https://api.github.com/users/vanyaland/following{/other_user}","gists_url":"https://api.github.com/users/vanyaland/gists{/gist_id}","starred_url":"https://api.github.com/users/vanyaland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanyaland/subscriptions","organizations_url":"https://api.github.com/users/vanyaland/orgs","repos_url":"https://api.github.com/users/vanyaland/repos","events_url":"https://api.github.com/users/vanyaland/events{/privacy}","received_events_url":"https://api.github.com/users/vanyaland/received_events","type":"User","site_admin":false},"assignees":[{"login":"vanyaland","id":8586063,"node_id":"MDQ6VXNlcjg1ODYwNjM=","avatar_url":"https://avatars0.githubusercontent.com/u/8586063?v=4","gravatar_id":"","url":"https://api.github.com/users/vanyaland","html_url":"https://github.com/vanyaland","followers_url":"https://api.github.com/users/vanyaland/followers","following_url":"https://api.github.com/users/vanyaland/following{/other_user}","gists_url":"https://api.github.com/users/vanyaland/gists{/gist_id}","starred_url":"https://api.github.com/users/vanyaland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanyaland/subscriptions","organizations_url":"https://api.github.com/users/vanyaland/orgs","repos_url":"https://api.github.com/users/vanyaland/repos","events_url":"https://api.github.com/users/vanyaland/events{/privacy}","received_events_url":"https://api.github.com/users/vanyaland/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"Ostrenkiy","id":6818370,"node_id":"MDQ6VXNlcjY4MTgzNzA=","avatar_url":"https://avatars3.githubusercontent.com/u/6818370?v=4","gravatar_id":"","url":"https://api.github.com/users/Ostrenkiy","html_url":"https://github.com/Ostrenkiy","followers_url":"https://api.github.com/users/Ostrenkiy/followers","following_url":"https://api.github.com/users/Ostrenkiy/following{/other_user}","gists_url":"https://api.github.com/users/Ostrenkiy/gists{/gist_id}","starred_url":"https://api.github.com/users/Ostrenkiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ostrenkiy/subscriptions","organizations_url":"https://api.github.com/users/Ostrenkiy/orgs","repos_url":"https://api.github.com/users/Ostrenkiy/repos","events_url":"https://api.github.com/users/Ostrenkiy/events{/privacy}","received_events_url":"https://api.github.com/users/Ostrenkiy/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":662974470,"node_id":"MDU6TGFiZWw2NjI5NzQ0NzA=","url":"https://api.github.com/repos/StepicOrg/stepik-ios/labels/main","name":"main","color":"66cc66","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/StepicOrg/stepik-ios/pulls/382/commits","review_comments_url":"https://api.github.com/repos/StepicOrg/stepik-ios/pulls/382/comments","review_comment_url":"https://api.github.com/repos/StepicOrg/stepik-ios/pulls/comments{/number}","comments_url":"https://api.github.com/repos/StepicOrg/stepik-ios/issues/382/comments","statuses_url":"https://api.github.com/repos/StepicOrg/stepik-ios/statuses/2cbaca719fb6802f36647a1a8fd3ecafeb613df2","head":{"label":"StepicOrg:feature/notifications-opening-service","ref":"feature/notifications-opening-service","sha":"2cbaca719fb6802f36647a1a8fd3ecafeb613df2","user":{"login":"StepicOrg","id":6727350,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY3MjczNTA=","avatar_url":"https://avatars0.githubusercontent.com/u/6727350?v=4","gravatar_id":"","url":"https://api.github.com/users/StepicOrg","html_url":"https://github.com/StepicOrg","followers_url":"https://api.github.com/users/StepicOrg/followers","following_url":"https://api.github.com/users/StepicOrg/following{/other_user}","gists_url":"https://api.github.com/users/StepicOrg/gists{/gist_id}","starred_url":"https://api.github.com/users/StepicOrg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StepicOrg/subscriptions","organizations_url":"https://api.github.com/users/StepicOrg/orgs","repos_url":"https://api.github.com/users/StepicOrg/repos","events_url":"https://api.github.com/users/StepicOrg/events{/privacy}","received_events_url":"https://api.github.com/users/StepicOrg/received_events","type":"Organization","site_admin":false},"repo":{"id":42045080,"node_id":"MDEwOlJlcG9zaXRvcnk0MjA0NTA4MA==","name":"stepik-ios","full_name":"StepicOrg/stepik-ios","private":false,"owner":{"login":"StepicOrg","id":6727350,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY3MjczNTA=","avatar_url":"https://avatars0.githubusercontent.com/u/6727350?v=4","gravatar_id":"","url":"https://api.github.com/users/StepicOrg","html_url":"https://github.com/StepicOrg","followers_url":"https://api.github.com/users/StepicOrg/followers","following_url":"https://api.github.com/users/StepicOrg/following{/other_user}","gists_url":"https://api.github.com/users/StepicOrg/gists{/gist_id}","starred_url":"https://api.github.com/users/StepicOrg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StepicOrg/subscriptions","organizations_url":"https://api.github.com/users/StepicOrg/orgs","repos_url":"https://api.github.com/users/StepicOrg/repos","events_url":"https://api.github.com/users/StepicOrg/events{/privacy}","received_events_url":"https://api.github.com/users/StepicOrg/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/StepicOrg/stepik-ios","description":"iOS application of online education platform","fork":false,"url":"https://api.github.com/repos/StepicOrg/stepik-ios","forks_url":"https://api.github.com/repos/StepicOrg/stepik-ios/forks","keys_url":"https://api.github.com/repos/StepicOrg/stepik-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/StepicOrg/stepik-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/StepicOrg/stepik-ios/teams","hooks_url":"https://api.github.com/repos/StepicOrg/stepik-ios/hooks","issue_events_url":"https://api.github.com/repos/StepicOrg/stepik-ios/issues/events{/number}","events_url":"https://api.github.com/repos/StepicOrg/stepik-ios/events","assignees_url":"https://api.github.com/repos/StepicOrg/stepik-ios/assignees{/user}","branches_url":"https://api.github.com/repos/StepicOrg/stepik-ios/branches{/branch}","tags_url":"https://api.github.com/repos/StepicOrg/stepik-ios/tags","blobs_url":"https://api.github.com/repos/StepicOrg/stepik-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/StepicOrg/stepik-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/StepicOrg/stepik-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/StepicOrg/stepik-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/StepicOrg/stepik-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/StepicOrg/stepik-ios/languages","stargazers_url":"https://api.github.com/repos/StepicOrg/stepik-ios/stargazers","contributors_url":"https://api.github.com/repos/StepicOrg/stepik-ios/contributors","subscribers_url":"https://api.github.com/repos/StepicOrg/stepik-ios/subscribers","subscription_url":"https://api.github.com/repos/StepicOrg/stepik-ios/subscription","commits_url":"https://api.github.com/repos/StepicOrg/stepik-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/StepicOrg/stepik-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/StepicOrg/stepik-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/StepicOrg/stepik-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/StepicOrg/stepik-ios/contents/{+path}","compare_url":"https://api.github.com/repos/StepicOrg/stepik-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/StepicOrg/stepik-ios/merges","archive_url":"https://api.github.com/repos/StepicOrg/stepik-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/StepicOrg/stepik-ios/downloads","issues_url":"https://api.github.com/repos/StepicOrg/stepik-ios/issues{/number}","pulls_url":"https://api.github.com/repos/StepicOrg/stepik-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/StepicOrg/stepik-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/StepicOrg/stepik-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/StepicOrg/stepik-ios/labels{/name}","releases_url":"https://api.github.com/repos/StepicOrg/stepik-ios/releases{/id}","deployments_url":"https://api.github.com/repos/StepicOrg/stepik-ios/deployments","created_at":"2015-09-07T09:51:32Z","updated_at":"2018-10-13T20:14:37Z","pushed_at":"2018-10-16T02:55:54Z","git_url":"git://github.com/StepicOrg/stepik-ios.git","ssh_url":"git@github.com:StepicOrg/stepik-ios.git","clone_url":"https://github.com/StepicOrg/stepik-ios.git","svn_url":"https://github.com/StepicOrg/stepik-ios","homepage":"https://stepik.org","size":81095,"stargazers_count":46,"watchers_count":46,"language":"Swift","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":17,"open_issues":4,"watchers":46,"default_branch":"master"}},"base":{"label":"StepicOrg:dev","ref":"dev","sha":"8dd6375dfaec6c31f83d47632ef9ab829171e46a","user":{"login":"StepicOrg","id":6727350,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY3MjczNTA=","avatar_url":"https://avatars0.githubusercontent.com/u/6727350?v=4","gravatar_id":"","url":"https://api.github.com/users/StepicOrg","html_url":"https://github.com/StepicOrg","followers_url":"https://api.github.com/users/StepicOrg/followers","following_url":"https://api.github.com/users/StepicOrg/following{/other_user}","gists_url":"https://api.github.com/users/StepicOrg/gists{/gist_id}","starred_url":"https://api.github.com/users/StepicOrg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StepicOrg/subscriptions","organizations_url":"https://api.github.com/users/StepicOrg/orgs","repos_url":"https://api.github.com/users/StepicOrg/repos","events_url":"https://api.github.com/users/StepicOrg/events{/privacy}","received_events_url":"https://api.github.com/users/StepicOrg/received_events","type":"Organization","site_admin":false},"repo":{"id":42045080,"node_id":"MDEwOlJlcG9zaXRvcnk0MjA0NTA4MA==","name":"stepik-ios","full_name":"StepicOrg/stepik-ios","private":false,"owner":{"login":"StepicOrg","id":6727350,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY3MjczNTA=","avatar_url":"https://avatars0.githubusercontent.com/u/6727350?v=4","gravatar_id":"","url":"https://api.github.com/users/StepicOrg","html_url":"https://github.com/StepicOrg","followers_url":"https://api.github.com/users/StepicOrg/followers","following_url":"https://api.github.com/users/StepicOrg/following{/other_user}","gists_url":"https://api.github.com/users/StepicOrg/gists{/gist_id}","starred_url":"https://api.github.com/users/StepicOrg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StepicOrg/subscriptions","organizations_url":"https://api.github.com/users/StepicOrg/orgs","repos_url":"https://api.github.com/users/StepicOrg/repos","events_url":"https://api.github.com/users/StepicOrg/events{/privacy}","received_events_url":"https://api.github.com/users/StepicOrg/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/StepicOrg/stepik-ios","description":"iOS application of online education platform","fork":false,"url":"https://api.github.com/repos/StepicOrg/stepik-ios","forks_url":"https://api.github.com/repos/StepicOrg/stepik-ios/forks","keys_url":"https://api.github.com/repos/StepicOrg/stepik-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/StepicOrg/stepik-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/StepicOrg/stepik-ios/teams","hooks_url":"https://api.github.com/repos/StepicOrg/stepik-ios/hooks","issue_events_url":"https://api.github.com/repos/StepicOrg/stepik-ios/issues/events{/number}","events_url":"https://api.github.com/repos/StepicOrg/stepik-ios/events","assignees_url":"https://api.github.com/repos/StepicOrg/stepik-ios/assignees{/user}","branches_url":"https://api.github.com/repos/StepicOrg/stepik-ios/branches{/branch}","tags_url":"https://api.github.com/repos/StepicOrg/stepik-ios/tags","blobs_url":"https://api.github.com/repos/StepicOrg/stepik-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/StepicOrg/stepik-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/StepicOrg/stepik-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/StepicOrg/stepik-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/StepicOrg/stepik-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/StepicOrg/stepik-ios/languages","stargazers_url":"https://api.github.com/repos/StepicOrg/stepik-ios/stargazers","contributors_url":"https://api.github.com/repos/StepicOrg/stepik-ios/contributors","subscribers_url":"https://api.github.com/repos/StepicOrg/stepik-ios/subscribers","subscription_url":"https://api.github.com/repos/StepicOrg/stepik-ios/subscription","commits_url":"https://api.github.com/repos/StepicOrg/stepik-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/StepicOrg/stepik-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/StepicOrg/stepik-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/StepicOrg/stepik-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/StepicOrg/stepik-ios/contents/{+path}","compare_url":"https://api.github.com/repos/StepicOrg/stepik-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/StepicOrg/stepik-ios/merges","archive_url":"https://api.github.com/repos/StepicOrg/stepik-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/StepicOrg/stepik-ios/downloads","issues_url":"https://api.github.com/repos/StepicOrg/stepik-ios/issues{/number}","pulls_url":"https://api.github.com/repos/StepicOrg/stepik-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/StepicOrg/stepik-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/StepicOrg/stepik-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/StepicOrg/stepik-ios/labels{/name}","releases_url":"https://api.github.com/repos/StepicOrg/stepik-ios/releases{/id}","deployments_url":"https://api.github.com/repos/StepicOrg/stepik-ios/deployments","created_at":"2015-09-07T09:51:32Z","updated_at":"2018-10-13T20:14:37Z","pushed_at":"2018-10-16T02:55:54Z","git_url":"git://github.com/StepicOrg/stepik-ios.git","ssh_url":"git@github.com:StepicOrg/stepik-ios.git","clone_url":"https://github.com/StepicOrg/stepik-ios.git","svn_url":"https://github.com/StepicOrg/stepik-ios","homepage":"https://stepik.org","size":81095,"stargazers_count":46,"watchers_count":46,"language":"Swift","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":17,"open_issues":4,"watchers":46,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/StepicOrg/stepik-ios/pulls/382"},"html":{"href":"https://github.com/StepicOrg/stepik-ios/pull/382"},"issue":{"href":"https://api.github.com/repos/StepicOrg/stepik-ios/issues/382"},"comments":{"href":"https://api.github.com/repos/StepicOrg/stepik-ios/issues/382/comments"},"review_comments":{"href":"https://api.github.com/repos/StepicOrg/stepik-ios/pulls/382/comments"},"review_comment":{"href":"https://api.github.com/repos/StepicOrg/stepik-ios/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/StepicOrg/stepik-ios/pulls/382/commits"},"statuses":{"href":"https://api.github.com/repos/StepicOrg/stepik-ios/statuses/2cbaca719fb6802f36647a1a8fd3ecafeb613df2"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"kvld"}}