{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/22838962","id":22838962,"diff_hunk":"@@ -228,12 +228,9 @@ function handleShare(data, callback) {\n         // Show a notification indicating success, and then close it immediately\n         // so it doesn't stink up the notifications tray! XXX: This UX isn't\n         // great; we should turn this into a transient notification when we can.\n-        new Notification(\n-          songtitle,\n-          {body: navigator.mozL10n.get(\n-            details.setAsDefault ? 'set-default-tone' : 'created-tone'\n-          )}\n-        ).close();\n+        NotificationHelper.send(songtitle, {\n+          bodyL10n: details.setAsDefault ? 'set-default-tone' : 'created-tone'\n+        }).close();","path":"apps/ringtones/js/share.js","position":12,"original_position":12,"commit_id":"1658b787fbaade8a73551fbf2cac232c335b0606","original_commit_id":"1658b787fbaade8a73551fbf2cac232c335b0606","user":{"login":"Gioyik","id":1834718,"avatar_url":"https://avatars.githubusercontent.com/u/1834718?v=3","gravatar_id":"","url":"https://api.github.com/users/Gioyik","html_url":"https://github.com/Gioyik","followers_url":"https://api.github.com/users/Gioyik/followers","following_url":"https://api.github.com/users/Gioyik/following{/other_user}","gists_url":"https://api.github.com/users/Gioyik/gists{/gist_id}","starred_url":"https://api.github.com/users/Gioyik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gioyik/subscriptions","organizations_url":"https://api.github.com/users/Gioyik/orgs","repos_url":"https://api.github.com/users/Gioyik/repos","events_url":"https://api.github.com/users/Gioyik/events{/privacy}","received_events_url":"https://api.github.com/users/Gioyik/received_events","type":"User","site_admin":false},"body":"In this way could work?\r\n```javascript\r\nNotificationHelper.send(songtitle, {\r\n  bodyL10n: details.setAsDefault ? 'set-default-tone' : 'created-tone'\r\n}).then(function(notification) {\r\n  notification.close();\r\n});\r\n```","created_at":"2015-01-13T01:57:45Z","updated_at":"2015-01-13T01:57:45Z","html_url":"https://github.com/mozilla-b2g/gaia/pull/27266#discussion_r22838962","pull_request_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/27266","_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/22838962"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/27266#discussion_r22838962"},"pull_request":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/27266"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/27266","id":27078596,"html_url":"https://github.com/mozilla-b2g/gaia/pull/27266","diff_url":"https://github.com/mozilla-b2g/gaia/pull/27266.diff","patch_url":"https://github.com/mozilla-b2g/gaia/pull/27266.patch","issue_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/27266","number":27266,"state":"open","locked":false,"title":"Bug 1111841 - Migrate Notifications to use the new NotificationHelper","user":{"login":"Gioyik","id":1834718,"avatar_url":"https://avatars.githubusercontent.com/u/1834718?v=3","gravatar_id":"","url":"https://api.github.com/users/Gioyik","html_url":"https://github.com/Gioyik","followers_url":"https://api.github.com/users/Gioyik/followers","following_url":"https://api.github.com/users/Gioyik/following{/other_user}","gists_url":"https://api.github.com/users/Gioyik/gists{/gist_id}","starred_url":"https://api.github.com/users/Gioyik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gioyik/subscriptions","organizations_url":"https://api.github.com/users/Gioyik/orgs","repos_url":"https://api.github.com/users/Gioyik/repos","events_url":"https://api.github.com/users/Gioyik/events{/privacy}","received_events_url":"https://api.github.com/users/Gioyik/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-09T03:45:30Z","updated_at":"2015-01-13T01:57:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6fb97a431bd2fe6b4b18d2e5dcf0ce4996305fba","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/27266/commits","review_comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/27266/comments","review_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/27266/comments","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/1658b787fbaade8a73551fbf2cac232c335b0606","head":{"label":"Gioyik:bug-1111841","ref":"bug-1111841","sha":"1658b787fbaade8a73551fbf2cac232c335b0606","user":{"login":"Gioyik","id":1834718,"avatar_url":"https://avatars.githubusercontent.com/u/1834718?v=3","gravatar_id":"","url":"https://api.github.com/users/Gioyik","html_url":"https://github.com/Gioyik","followers_url":"https://api.github.com/users/Gioyik/followers","following_url":"https://api.github.com/users/Gioyik/following{/other_user}","gists_url":"https://api.github.com/users/Gioyik/gists{/gist_id}","starred_url":"https://api.github.com/users/Gioyik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gioyik/subscriptions","organizations_url":"https://api.github.com/users/Gioyik/orgs","repos_url":"https://api.github.com/users/Gioyik/repos","events_url":"https://api.github.com/users/Gioyik/events{/privacy}","received_events_url":"https://api.github.com/users/Gioyik/received_events","type":"User","site_admin":false},"repo":{"id":28672142,"name":"gaia","full_name":"Gioyik/gaia","owner":{"login":"Gioyik","id":1834718,"avatar_url":"https://avatars.githubusercontent.com/u/1834718?v=3","gravatar_id":"","url":"https://api.github.com/users/Gioyik","html_url":"https://github.com/Gioyik","followers_url":"https://api.github.com/users/Gioyik/followers","following_url":"https://api.github.com/users/Gioyik/following{/other_user}","gists_url":"https://api.github.com/users/Gioyik/gists{/gist_id}","starred_url":"https://api.github.com/users/Gioyik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gioyik/subscriptions","organizations_url":"https://api.github.com/users/Gioyik/orgs","repos_url":"https://api.github.com/users/Gioyik/repos","events_url":"https://api.github.com/users/Gioyik/events{/privacy}","received_events_url":"https://api.github.com/users/Gioyik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Gioyik/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see","fork":true,"url":"https://api.github.com/repos/Gioyik/gaia","forks_url":"https://api.github.com/repos/Gioyik/gaia/forks","keys_url":"https://api.github.com/repos/Gioyik/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Gioyik/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Gioyik/gaia/teams","hooks_url":"https://api.github.com/repos/Gioyik/gaia/hooks","issue_events_url":"https://api.github.com/repos/Gioyik/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/Gioyik/gaia/events","assignees_url":"https://api.github.com/repos/Gioyik/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/Gioyik/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/Gioyik/gaia/tags","blobs_url":"https://api.github.com/repos/Gioyik/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Gioyik/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Gioyik/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/Gioyik/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Gioyik/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/Gioyik/gaia/languages","stargazers_url":"https://api.github.com/repos/Gioyik/gaia/stargazers","contributors_url":"https://api.github.com/repos/Gioyik/gaia/contributors","subscribers_url":"https://api.github.com/repos/Gioyik/gaia/subscribers","subscription_url":"https://api.github.com/repos/Gioyik/gaia/subscription","commits_url":"https://api.github.com/repos/Gioyik/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/Gioyik/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/Gioyik/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/Gioyik/gaia/issues/comments/{number}","contents_url":"https://api.github.com/repos/Gioyik/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/Gioyik/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Gioyik/gaia/merges","archive_url":"https://api.github.com/repos/Gioyik/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Gioyik/gaia/downloads","issues_url":"https://api.github.com/repos/Gioyik/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/Gioyik/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/Gioyik/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/Gioyik/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Gioyik/gaia/labels{/name}","releases_url":"https://api.github.com/repos/Gioyik/gaia/releases{/id}","created_at":"2014-12-31T18:18:21Z","updated_at":"2015-01-09T21:37:47Z","pushed_at":"2015-01-12T21:51:52Z","git_url":"git://github.com/Gioyik/gaia.git","ssh_url":"git@github.com:Gioyik/gaia.git","clone_url":"https://github.com/Gioyik/gaia.git","svn_url":"https://github.com/Gioyik/gaia","homepage":"https://wiki.mozilla.org/B2G","size":879132,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla-b2g:master","ref":"master","sha":"31103e31ab135755968df2835373317837b39f87","user":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"repo":{"id":2317369,"name":"gaia","full_name":"mozilla-b2g/gaia","owner":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-b2g/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see","fork":false,"url":"https://api.github.com/repos/mozilla-b2g/gaia","forks_url":"https://api.github.com/repos/mozilla-b2g/gaia/forks","keys_url":"https://api.github.com/repos/mozilla-b2g/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-b2g/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-b2g/gaia/teams","hooks_url":"https://api.github.com/repos/mozilla-b2g/gaia/hooks","issue_events_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-b2g/gaia/events","assignees_url":"https://api.github.com/repos/mozilla-b2g/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-b2g/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/tags","blobs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-b2g/gaia/languages","stargazers_url":"https://api.github.com/repos/mozilla-b2g/gaia/stargazers","contributors_url":"https://api.github.com/repos/mozilla-b2g/gaia/contributors","subscribers_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscribers","subscription_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscription","commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla-b2g/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-b2g/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-b2g/gaia/merges","archive_url":"https://api.github.com/repos/mozilla-b2g/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-b2g/gaia/downloads","issues_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-b2g/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-b2g/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-b2g/gaia/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-b2g/gaia/releases{/id}","created_at":"2011-09-03T01:38:46Z","updated_at":"2015-01-12T20:31:25Z","pushed_at":"2015-01-12T21:45:23Z","git_url":"git://github.com/mozilla-b2g/gaia.git","ssh_url":"git@github.com:mozilla-b2g/gaia.git","clone_url":"https://github.com/mozilla-b2g/gaia.git","svn_url":"https://github.com/mozilla-b2g/gaia","homepage":"https://wiki.mozilla.org/B2G","size":1374606,"stargazers_count":1849,"watchers_count":1849,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2163,"mirror_url":null,"open_issues_count":813,"forks":2163,"open_issues":813,"watchers":1849,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/27266"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/27266"},"issue":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/27266"},"comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/27266/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/27266/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/27266/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/1658b787fbaade8a73551fbf2cac232c335b0606"}}}}