{"action":"created","comment":{"url":"https://api.github.com/repos/ekonstantinidis/gitify/pulls/comments/32372023","id":32372023,"diff_hunk":"@@ -21,6 +22,35 @@ var NotificationsStore = Reflux.createStore({\n     }\n   },\n \n+  isNewNotification: function (response) {\n+    var self = this;\n+    var playSound = SettingsStore.getSettings().playSound;\n+\n+    if (!playSound) { return; }\n+\n+    // Check if notification is already in the store.\n+    var isNew = false;\n+    _.map(response, function (obj) {\n+      if (!_.contains(self._previousNotifications, obj.id)) {\n+        isNew = true;\n+      }\n+    });\n+\n+    // Play Sound.\n+    if (isNew) {\n+      if (playSound) {\n+        var audio = new Audio('sounds/digi.wav');","path":"src/js/stores/notifications.js","position":29,"original_position":29,"commit_id":"24c973e8f8286cc356effa91e68d958e10f56a06","original_commit_id":"24c973e8f8286cc356effa91e68d958e10f56a06","user":{"login":"JakeSidSmith","id":5850625,"avatar_url":"https://avatars.githubusercontent.com/u/5850625?v=3","gravatar_id":"","url":"https://api.github.com/users/JakeSidSmith","html_url":"https://github.com/JakeSidSmith","followers_url":"https://api.github.com/users/JakeSidSmith/followers","following_url":"https://api.github.com/users/JakeSidSmith/following{/other_user}","gists_url":"https://api.github.com/users/JakeSidSmith/gists{/gist_id}","starred_url":"https://api.github.com/users/JakeSidSmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakeSidSmith/subscriptions","organizations_url":"https://api.github.com/users/JakeSidSmith/orgs","repos_url":"https://api.github.com/users/JakeSidSmith/repos","events_url":"https://api.github.com/users/JakeSidSmith/events{/privacy}","received_events_url":"https://api.github.com/users/JakeSidSmith/received_events","type":"User","site_admin":false},"body":"I would load this when the app first loads. :) Perhaps have a store for sounds / notifications.","created_at":"2015-06-13T17:04:57Z","updated_at":"2015-06-13T17:04:57Z","html_url":"https://github.com/ekonstantinidis/gitify/pull/56#discussion_r32372023","pull_request_url":"https://api.github.com/repos/ekonstantinidis/gitify/pulls/56","_links":{"self":{"href":"https://api.github.com/repos/ekonstantinidis/gitify/pulls/comments/32372023"},"html":{"href":"https://github.com/ekonstantinidis/gitify/pull/56#discussion_r32372023"},"pull_request":{"href":"https://api.github.com/repos/ekonstantinidis/gitify/pulls/56"}}},"pull_request":{"url":"https://api.github.com/repos/ekonstantinidis/gitify/pulls/56","id":37596282,"html_url":"https://github.com/ekonstantinidis/gitify/pull/56","diff_url":"https://github.com/ekonstantinidis/gitify/pull/56.diff","patch_url":"https://github.com/ekonstantinidis/gitify/pull/56.patch","issue_url":"https://api.github.com/repos/ekonstantinidis/gitify/issues/56","number":56,"state":"open","locked":false,"title":"Notifications / Sounds","user":{"login":"ekonstantinidis","id":6333409,"avatar_url":"https://avatars.githubusercontent.com/u/6333409?v=3","gravatar_id":"","url":"https://api.github.com/users/ekonstantinidis","html_url":"https://github.com/ekonstantinidis","followers_url":"https://api.github.com/users/ekonstantinidis/followers","following_url":"https://api.github.com/users/ekonstantinidis/following{/other_user}","gists_url":"https://api.github.com/users/ekonstantinidis/gists{/gist_id}","starred_url":"https://api.github.com/users/ekonstantinidis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekonstantinidis/subscriptions","organizations_url":"https://api.github.com/users/ekonstantinidis/orgs","repos_url":"https://api.github.com/users/ekonstantinidis/repos","events_url":"https://api.github.com/users/ekonstantinidis/events{/privacy}","received_events_url":"https://api.github.com/users/ekonstantinidis/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-12T19:27:59Z","updated_at":"2015-06-13T17:04:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6e27e05c5c27bf5a3c14ba3463a870a677c5fc8e","assignee":null,"milestone":{"url":"https://api.github.com/repos/ekonstantinidis/gitify/milestones/3","html_url":"https://github.com/ekonstantinidis/gitify/milestones/Release%200.0.13","labels_url":"https://api.github.com/repos/ekonstantinidis/gitify/milestones/3/labels","id":1159413,"number":3,"title":"Release 0.0.13","description":"","creator":{"login":"ekonstantinidis","id":6333409,"avatar_url":"https://avatars.githubusercontent.com/u/6333409?v=3","gravatar_id":"","url":"https://api.github.com/users/ekonstantinidis","html_url":"https://github.com/ekonstantinidis","followers_url":"https://api.github.com/users/ekonstantinidis/followers","following_url":"https://api.github.com/users/ekonstantinidis/following{/other_user}","gists_url":"https://api.github.com/users/ekonstantinidis/gists{/gist_id}","starred_url":"https://api.github.com/users/ekonstantinidis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekonstantinidis/subscriptions","organizations_url":"https://api.github.com/users/ekonstantinidis/orgs","repos_url":"https://api.github.com/users/ekonstantinidis/repos","events_url":"https://api.github.com/users/ekonstantinidis/events{/privacy}","received_events_url":"https://api.github.com/users/ekonstantinidis/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":3,"state":"open","created_at":"2015-06-10T22:58:07Z","updated_at":"2015-06-13T00:41:52Z","due_on":"2015-06-13T23:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/ekonstantinidis/gitify/pulls/56/commits","review_comments_url":"https://api.github.com/repos/ekonstantinidis/gitify/pulls/56/comments","review_comment_url":"https://api.github.com/repos/ekonstantinidis/gitify/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ekonstantinidis/gitify/issues/56/comments","statuses_url":"https://api.github.com/repos/ekonstantinidis/gitify/statuses/24c973e8f8286cc356effa91e68d958e10f56a06","head":{"label":"ekonstantinidis:play-sound","ref":"play-sound","sha":"24c973e8f8286cc356effa91e68d958e10f56a06","user":{"login":"ekonstantinidis","id":6333409,"avatar_url":"https://avatars.githubusercontent.com/u/6333409?v=3","gravatar_id":"","url":"https://api.github.com/users/ekonstantinidis","html_url":"https://github.com/ekonstantinidis","followers_url":"https://api.github.com/users/ekonstantinidis/followers","following_url":"https://api.github.com/users/ekonstantinidis/following{/other_user}","gists_url":"https://api.github.com/users/ekonstantinidis/gists{/gist_id}","starred_url":"https://api.github.com/users/ekonstantinidis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekonstantinidis/subscriptions","organizations_url":"https://api.github.com/users/ekonstantinidis/orgs","repos_url":"https://api.github.com/users/ekonstantinidis/repos","events_url":"https://api.github.com/users/ekonstantinidis/events{/privacy}","received_events_url":"https://api.github.com/users/ekonstantinidis/received_events","type":"User","site_admin":false},"repo":{"id":36029706,"name":"gitify","full_name":"ekonstantinidis/gitify","owner":{"login":"ekonstantinidis","id":6333409,"avatar_url":"https://avatars.githubusercontent.com/u/6333409?v=3","gravatar_id":"","url":"https://api.github.com/users/ekonstantinidis","html_url":"https://github.com/ekonstantinidis","followers_url":"https://api.github.com/users/ekonstantinidis/followers","following_url":"https://api.github.com/users/ekonstantinidis/following{/other_user}","gists_url":"https://api.github.com/users/ekonstantinidis/gists{/gist_id}","starred_url":"https://api.github.com/users/ekonstantinidis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekonstantinidis/subscriptions","organizations_url":"https://api.github.com/users/ekonstantinidis/orgs","repos_url":"https://api.github.com/users/ekonstantinidis/repos","events_url":"https://api.github.com/users/ekonstantinidis/events{/privacy}","received_events_url":"https://api.github.com/users/ekonstantinidis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ekonstantinidis/gitify","description":"GitHub Notifications on your menu bar.","fork":false,"url":"https://api.github.com/repos/ekonstantinidis/gitify","forks_url":"https://api.github.com/repos/ekonstantinidis/gitify/forks","keys_url":"https://api.github.com/repos/ekonstantinidis/gitify/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ekonstantinidis/gitify/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ekonstantinidis/gitify/teams","hooks_url":"https://api.github.com/repos/ekonstantinidis/gitify/hooks","issue_events_url":"https://api.github.com/repos/ekonstantinidis/gitify/issues/events{/number}","events_url":"https://api.github.com/repos/ekonstantinidis/gitify/events","assignees_url":"https://api.github.com/repos/ekonstantinidis/gitify/assignees{/user}","branches_url":"https://api.github.com/repos/ekonstantinidis/gitify/branches{/branch}","tags_url":"https://api.github.com/repos/ekonstantinidis/gitify/tags","blobs_url":"https://api.github.com/repos/ekonstantinidis/gitify/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ekonstantinidis/gitify/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ekonstantinidis/gitify/git/refs{/sha}","trees_url":"https://api.github.com/repos/ekonstantinidis/gitify/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ekonstantinidis/gitify/statuses/{sha}","languages_url":"https://api.github.com/repos/ekonstantinidis/gitify/languages","stargazers_url":"https://api.github.com/repos/ekonstantinidis/gitify/stargazers","contributors_url":"https://api.github.com/repos/ekonstantinidis/gitify/contributors","subscribers_url":"https://api.github.com/repos/ekonstantinidis/gitify/subscribers","subscription_url":"https://api.github.com/repos/ekonstantinidis/gitify/subscription","commits_url":"https://api.github.com/repos/ekonstantinidis/gitify/commits{/sha}","git_commits_url":"https://api.github.com/repos/ekonstantinidis/gitify/git/commits{/sha}","comments_url":"https://api.github.com/repos/ekonstantinidis/gitify/comments{/number}","issue_comment_url":"https://api.github.com/repos/ekonstantinidis/gitify/issues/comments{/number}","contents_url":"https://api.github.com/repos/ekonstantinidis/gitify/contents/{+path}","compare_url":"https://api.github.com/repos/ekonstantinidis/gitify/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ekonstantinidis/gitify/merges","archive_url":"https://api.github.com/repos/ekonstantinidis/gitify/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ekonstantinidis/gitify/downloads","issues_url":"https://api.github.com/repos/ekonstantinidis/gitify/issues{/number}","pulls_url":"https://api.github.com/repos/ekonstantinidis/gitify/pulls{/number}","milestones_url":"https://api.github.com/repos/ekonstantinidis/gitify/milestones{/number}","notifications_url":"https://api.github.com/repos/ekonstantinidis/gitify/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ekonstantinidis/gitify/labels{/name}","releases_url":"https://api.github.com/repos/ekonstantinidis/gitify/releases{/id}","created_at":"2015-05-21T18:15:28Z","updated_at":"2015-06-13T05:23:45Z","pushed_at":"2015-06-13T16:55:39Z","git_url":"git://github.com/ekonstantinidis/gitify.git","ssh_url":"git@github.com:ekonstantinidis/gitify.git","clone_url":"https://github.com/ekonstantinidis/gitify.git","svn_url":"https://github.com/ekonstantinidis/gitify","homepage":"","size":1472,"stargazers_count":220,"watchers_count":220,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":7,"forks":7,"open_issues":7,"watchers":220,"default_branch":"master"}},"base":{"label":"ekonstantinidis:master","ref":"master","sha":"7475f3ea25d31cdee897c7d4876aeb2af2077bc5","user":{"login":"ekonstantinidis","id":6333409,"avatar_url":"https://avatars.githubusercontent.com/u/6333409?v=3","gravatar_id":"","url":"https://api.github.com/users/ekonstantinidis","html_url":"https://github.com/ekonstantinidis","followers_url":"https://api.github.com/users/ekonstantinidis/followers","following_url":"https://api.github.com/users/ekonstantinidis/following{/other_user}","gists_url":"https://api.github.com/users/ekonstantinidis/gists{/gist_id}","starred_url":"https://api.github.com/users/ekonstantinidis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekonstantinidis/subscriptions","organizations_url":"https://api.github.com/users/ekonstantinidis/orgs","repos_url":"https://api.github.com/users/ekonstantinidis/repos","events_url":"https://api.github.com/users/ekonstantinidis/events{/privacy}","received_events_url":"https://api.github.com/users/ekonstantinidis/received_events","type":"User","site_admin":false},"repo":{"id":36029706,"name":"gitify","full_name":"ekonstantinidis/gitify","owner":{"login":"ekonstantinidis","id":6333409,"avatar_url":"https://avatars.githubusercontent.com/u/6333409?v=3","gravatar_id":"","url":"https://api.github.com/users/ekonstantinidis","html_url":"https://github.com/ekonstantinidis","followers_url":"https://api.github.com/users/ekonstantinidis/followers","following_url":"https://api.github.com/users/ekonstantinidis/following{/other_user}","gists_url":"https://api.github.com/users/ekonstantinidis/gists{/gist_id}","starred_url":"https://api.github.com/users/ekonstantinidis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekonstantinidis/subscriptions","organizations_url":"https://api.github.com/users/ekonstantinidis/orgs","repos_url":"https://api.github.com/users/ekonstantinidis/repos","events_url":"https://api.github.com/users/ekonstantinidis/events{/privacy}","received_events_url":"https://api.github.com/users/ekonstantinidis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ekonstantinidis/gitify","description":"GitHub Notifications on your menu bar.","fork":false,"url":"https://api.github.com/repos/ekonstantinidis/gitify","forks_url":"https://api.github.com/repos/ekonstantinidis/gitify/forks","keys_url":"https://api.github.com/repos/ekonstantinidis/gitify/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ekonstantinidis/gitify/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ekonstantinidis/gitify/teams","hooks_url":"https://api.github.com/repos/ekonstantinidis/gitify/hooks","issue_events_url":"https://api.github.com/repos/ekonstantinidis/gitify/issues/events{/number}","events_url":"https://api.github.com/repos/ekonstantinidis/gitify/events","assignees_url":"https://api.github.com/repos/ekonstantinidis/gitify/assignees{/user}","branches_url":"https://api.github.com/repos/ekonstantinidis/gitify/branches{/branch}","tags_url":"https://api.github.com/repos/ekonstantinidis/gitify/tags","blobs_url":"https://api.github.com/repos/ekonstantinidis/gitify/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ekonstantinidis/gitify/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ekonstantinidis/gitify/git/refs{/sha}","trees_url":"https://api.github.com/repos/ekonstantinidis/gitify/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ekonstantinidis/gitify/statuses/{sha}","languages_url":"https://api.github.com/repos/ekonstantinidis/gitify/languages","stargazers_url":"https://api.github.com/repos/ekonstantinidis/gitify/stargazers","contributors_url":"https://api.github.com/repos/ekonstantinidis/gitify/contributors","subscribers_url":"https://api.github.com/repos/ekonstantinidis/gitify/subscribers","subscription_url":"https://api.github.com/repos/ekonstantinidis/gitify/subscription","commits_url":"https://api.github.com/repos/ekonstantinidis/gitify/commits{/sha}","git_commits_url":"https://api.github.com/repos/ekonstantinidis/gitify/git/commits{/sha}","comments_url":"https://api.github.com/repos/ekonstantinidis/gitify/comments{/number}","issue_comment_url":"https://api.github.com/repos/ekonstantinidis/gitify/issues/comments{/number}","contents_url":"https://api.github.com/repos/ekonstantinidis/gitify/contents/{+path}","compare_url":"https://api.github.com/repos/ekonstantinidis/gitify/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ekonstantinidis/gitify/merges","archive_url":"https://api.github.com/repos/ekonstantinidis/gitify/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ekonstantinidis/gitify/downloads","issues_url":"https://api.github.com/repos/ekonstantinidis/gitify/issues{/number}","pulls_url":"https://api.github.com/repos/ekonstantinidis/gitify/pulls{/number}","milestones_url":"https://api.github.com/repos/ekonstantinidis/gitify/milestones{/number}","notifications_url":"https://api.github.com/repos/ekonstantinidis/gitify/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ekonstantinidis/gitify/labels{/name}","releases_url":"https://api.github.com/repos/ekonstantinidis/gitify/releases{/id}","created_at":"2015-05-21T18:15:28Z","updated_at":"2015-06-13T05:23:45Z","pushed_at":"2015-06-13T16:55:39Z","git_url":"git://github.com/ekonstantinidis/gitify.git","ssh_url":"git@github.com:ekonstantinidis/gitify.git","clone_url":"https://github.com/ekonstantinidis/gitify.git","svn_url":"https://github.com/ekonstantinidis/gitify","homepage":"","size":1472,"stargazers_count":220,"watchers_count":220,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":7,"forks":7,"open_issues":7,"watchers":220,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ekonstantinidis/gitify/pulls/56"},"html":{"href":"https://github.com/ekonstantinidis/gitify/pull/56"},"issue":{"href":"https://api.github.com/repos/ekonstantinidis/gitify/issues/56"},"comments":{"href":"https://api.github.com/repos/ekonstantinidis/gitify/issues/56/comments"},"review_comments":{"href":"https://api.github.com/repos/ekonstantinidis/gitify/pulls/56/comments"},"review_comment":{"href":"https://api.github.com/repos/ekonstantinidis/gitify/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ekonstantinidis/gitify/pulls/56/commits"},"statuses":{"href":"https://api.github.com/repos/ekonstantinidis/gitify/statuses/24c973e8f8286cc356effa91e68d958e10f56a06"}}}}