{"action":"created","comment":{"url":"https://api.github.com/repos/democracyworks/election-notification-works/pulls/comments/38158029","id":38158029,"diff_hunk":"@@ -15,28 +15,27 @@\n    :mediums (set (:notification/medium entity))})\n \n (defn read-subscription-entity\n-  [db user-id]\n-  (db/find-one '{:find [?subscription]\n-                 :in [$ ?user-id]\n-                 :where [[?subscription :user/id ?user-id]]}\n-               db user-id))\n+  ([user-id] (read-subscription-entity (db/db) user-id))\n+  ([db user-id]\n+   (db/find-one '{:find [?subscription]\n+                  :in [$ ?user-id]\n+                  :where [[?subscription :user/id ?user-id]]}\n+                db user-id)))\n \n (defn read-subscription\n-  [db user-id]\n-  (some-> (read-subscription-entity db user-id)\n-          entity->subscription))\n+  ([user-id] (read-subscription (db/db) user-id))\n+  ([db user-id]\n+   (some-> (read-subscription-entity db user-id)\n+           entity->subscription)))\n \n (defn update-subscription\n   [old-subscription new-subscription]\n-  (if (empty (set/difference (:mediums old-subscription)","path":"src/election_notification_works/entities/subscription.clj","position":27,"original_position":27,"commit_id":"31fa320cd10a586e9bc0f7517c71b768014b93c4","original_commit_id":"31fa320cd10a586e9bc0f7517c71b768014b93c4","user":{"login":"cap10morgan","id":59748,"avatar_url":"https://avatars.githubusercontent.com/u/59748?v=3","gravatar_id":"","url":"https://api.github.com/users/cap10morgan","html_url":"https://github.com/cap10morgan","followers_url":"https://api.github.com/users/cap10morgan/followers","following_url":"https://api.github.com/users/cap10morgan/following{/other_user}","gists_url":"https://api.github.com/users/cap10morgan/gists{/gist_id}","starred_url":"https://api.github.com/users/cap10morgan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cap10morgan/subscriptions","organizations_url":"https://api.github.com/users/cap10morgan/orgs","repos_url":"https://api.github.com/users/cap10morgan/repos","events_url":"https://api.github.com/users/cap10morgan/events{/privacy}","received_events_url":"https://api.github.com/users/cap10morgan/received_events","type":"User","site_admin":false},"body":"Exactly. You'll see that it's now using `empty?` in its new home in the `handlers` ns.","created_at":"2015-08-27T23:24:37Z","updated_at":"2015-08-27T23:24:37Z","html_url":"https://github.com/democracyworks/election-notification-works/pull/14#discussion_r38158029","pull_request_url":"https://api.github.com/repos/democracyworks/election-notification-works/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/democracyworks/election-notification-works/pulls/comments/38158029"},"html":{"href":"https://github.com/democracyworks/election-notification-works/pull/14#discussion_r38158029"},"pull_request":{"href":"https://api.github.com/repos/democracyworks/election-notification-works/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/democracyworks/election-notification-works/pulls/14","id":43578013,"html_url":"https://github.com/democracyworks/election-notification-works/pull/14","diff_url":"https://github.com/democracyworks/election-notification-works/pull/14.diff","patch_url":"https://github.com/democracyworks/election-notification-works/pull/14.patch","issue_url":"https://api.github.com/repos/democracyworks/election-notification-works/issues/14","number":14,"state":"open","locked":false,"title":"Only confirm new subscriptions","user":{"login":"cap10morgan","id":59748,"avatar_url":"https://avatars.githubusercontent.com/u/59748?v=3","gravatar_id":"","url":"https://api.github.com/users/cap10morgan","html_url":"https://github.com/cap10morgan","followers_url":"https://api.github.com/users/cap10morgan/followers","following_url":"https://api.github.com/users/cap10morgan/following{/other_user}","gists_url":"https://api.github.com/users/cap10morgan/gists{/gist_id}","starred_url":"https://api.github.com/users/cap10morgan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cap10morgan/subscriptions","organizations_url":"https://api.github.com/users/cap10morgan/orgs","repos_url":"https://api.github.com/users/cap10morgan/repos","events_url":"https://api.github.com/users/cap10morgan/events{/privacy}","received_events_url":"https://api.github.com/users/cap10morgan/received_events","type":"User","site_admin":false},"body":"turbovote-web users were seeing a confirmation on every step change because we're (unfortunately) re-PUT'ing the subscriptions on each one for now.\r\n\r\nThis makes subscription PUTs idempotent w/r/t confirmation messages.","created_at":"2015-08-27T23:14:28Z","updated_at":"2015-08-27T23:24:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"59f5caa8cc6cb4119f5d14ac42bafc8bca26ea28","assignee":{"login":"ericnormand","id":116172,"avatar_url":"https://avatars.githubusercontent.com/u/116172?v=3","gravatar_id":"","url":"https://api.github.com/users/ericnormand","html_url":"https://github.com/ericnormand","followers_url":"https://api.github.com/users/ericnormand/followers","following_url":"https://api.github.com/users/ericnormand/following{/other_user}","gists_url":"https://api.github.com/users/ericnormand/gists{/gist_id}","starred_url":"https://api.github.com/users/ericnormand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericnormand/subscriptions","organizations_url":"https://api.github.com/users/ericnormand/orgs","repos_url":"https://api.github.com/users/ericnormand/repos","events_url":"https://api.github.com/users/ericnormand/events{/privacy}","received_events_url":"https://api.github.com/users/ericnormand/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/democracyworks/election-notification-works/pulls/14/commits","review_comments_url":"https://api.github.com/repos/democracyworks/election-notification-works/pulls/14/comments","review_comment_url":"https://api.github.com/repos/democracyworks/election-notification-works/pulls/comments{/number}","comments_url":"https://api.github.com/repos/democracyworks/election-notification-works/issues/14/comments","statuses_url":"https://api.github.com/repos/democracyworks/election-notification-works/statuses/31fa320cd10a586e9bc0f7517c71b768014b93c4","head":{"label":"democracyworks:only-confirm-new-subscriptions","ref":"only-confirm-new-subscriptions","sha":"31fa320cd10a586e9bc0f7517c71b768014b93c4","user":{"login":"democracyworks","id":1373557,"avatar_url":"https://avatars.githubusercontent.com/u/1373557?v=3","gravatar_id":"","url":"https://api.github.com/users/democracyworks","html_url":"https://github.com/democracyworks","followers_url":"https://api.github.com/users/democracyworks/followers","following_url":"https://api.github.com/users/democracyworks/following{/other_user}","gists_url":"https://api.github.com/users/democracyworks/gists{/gist_id}","starred_url":"https://api.github.com/users/democracyworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/democracyworks/subscriptions","organizations_url":"https://api.github.com/users/democracyworks/orgs","repos_url":"https://api.github.com/users/democracyworks/repos","events_url":"https://api.github.com/users/democracyworks/events{/privacy}","received_events_url":"https://api.github.com/users/democracyworks/received_events","type":"Organization","site_admin":false},"repo":{"id":37935024,"name":"election-notification-works","full_name":"democracyworks/election-notification-works","owner":{"login":"democracyworks","id":1373557,"avatar_url":"https://avatars.githubusercontent.com/u/1373557?v=3","gravatar_id":"","url":"https://api.github.com/users/democracyworks","html_url":"https://github.com/democracyworks","followers_url":"https://api.github.com/users/democracyworks/followers","following_url":"https://api.github.com/users/democracyworks/following{/other_user}","gists_url":"https://api.github.com/users/democracyworks/gists{/gist_id}","starred_url":"https://api.github.com/users/democracyworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/democracyworks/subscriptions","organizations_url":"https://api.github.com/users/democracyworks/orgs","repos_url":"https://api.github.com/users/democracyworks/repos","events_url":"https://api.github.com/users/democracyworks/events{/privacy}","received_events_url":"https://api.github.com/users/democracyworks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/democracyworks/election-notification-works","description":"","fork":false,"url":"https://api.github.com/repos/democracyworks/election-notification-works","forks_url":"https://api.github.com/repos/democracyworks/election-notification-works/forks","keys_url":"https://api.github.com/repos/democracyworks/election-notification-works/keys{/key_id}","collaborators_url":"https://api.github.com/repos/democracyworks/election-notification-works/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/democracyworks/election-notification-works/teams","hooks_url":"https://api.github.com/repos/democracyworks/election-notification-works/hooks","issue_events_url":"https://api.github.com/repos/democracyworks/election-notification-works/issues/events{/number}","events_url":"https://api.github.com/repos/democracyworks/election-notification-works/events","assignees_url":"https://api.github.com/repos/democracyworks/election-notification-works/assignees{/user}","branches_url":"https://api.github.com/repos/democracyworks/election-notification-works/branches{/branch}","tags_url":"https://api.github.com/repos/democracyworks/election-notification-works/tags","blobs_url":"https://api.github.com/repos/democracyworks/election-notification-works/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/democracyworks/election-notification-works/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/democracyworks/election-notification-works/git/refs{/sha}","trees_url":"https://api.github.com/repos/democracyworks/election-notification-works/git/trees{/sha}","statuses_url":"https://api.github.com/repos/democracyworks/election-notification-works/statuses/{sha}","languages_url":"https://api.github.com/repos/democracyworks/election-notification-works/languages","stargazers_url":"https://api.github.com/repos/democracyworks/election-notification-works/stargazers","contributors_url":"https://api.github.com/repos/democracyworks/election-notification-works/contributors","subscribers_url":"https://api.github.com/repos/democracyworks/election-notification-works/subscribers","subscription_url":"https://api.github.com/repos/democracyworks/election-notification-works/subscription","commits_url":"https://api.github.com/repos/democracyworks/election-notification-works/commits{/sha}","git_commits_url":"https://api.github.com/repos/democracyworks/election-notification-works/git/commits{/sha}","comments_url":"https://api.github.com/repos/democracyworks/election-notification-works/comments{/number}","issue_comment_url":"https://api.github.com/repos/democracyworks/election-notification-works/issues/comments{/number}","contents_url":"https://api.github.com/repos/democracyworks/election-notification-works/contents/{+path}","compare_url":"https://api.github.com/repos/democracyworks/election-notification-works/compare/{base}...{head}","merges_url":"https://api.github.com/repos/democracyworks/election-notification-works/merges","archive_url":"https://api.github.com/repos/democracyworks/election-notification-works/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/democracyworks/election-notification-works/downloads","issues_url":"https://api.github.com/repos/democracyworks/election-notification-works/issues{/number}","pulls_url":"https://api.github.com/repos/democracyworks/election-notification-works/pulls{/number}","milestones_url":"https://api.github.com/repos/democracyworks/election-notification-works/milestones{/number}","notifications_url":"https://api.github.com/repos/democracyworks/election-notification-works/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/democracyworks/election-notification-works/labels{/name}","releases_url":"https://api.github.com/repos/democracyworks/election-notification-works/releases{/id}","created_at":"2015-06-23T17:50:09Z","updated_at":"2015-06-23T17:50:20Z","pushed_at":"2015-08-27T23:14:28Z","git_url":"git://github.com/democracyworks/election-notification-works.git","ssh_url":"git@github.com:democracyworks/election-notification-works.git","clone_url":"https://github.com/democracyworks/election-notification-works.git","svn_url":"https://github.com/democracyworks/election-notification-works","homepage":null,"size":340,"stargazers_count":0,"watchers_count":0,"language":"Clojure","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"democracyworks:master","ref":"master","sha":"f2998b9ba85b5404167d78d303f1709bdb466b35","user":{"login":"democracyworks","id":1373557,"avatar_url":"https://avatars.githubusercontent.com/u/1373557?v=3","gravatar_id":"","url":"https://api.github.com/users/democracyworks","html_url":"https://github.com/democracyworks","followers_url":"https://api.github.com/users/democracyworks/followers","following_url":"https://api.github.com/users/democracyworks/following{/other_user}","gists_url":"https://api.github.com/users/democracyworks/gists{/gist_id}","starred_url":"https://api.github.com/users/democracyworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/democracyworks/subscriptions","organizations_url":"https://api.github.com/users/democracyworks/orgs","repos_url":"https://api.github.com/users/democracyworks/repos","events_url":"https://api.github.com/users/democracyworks/events{/privacy}","received_events_url":"https://api.github.com/users/democracyworks/received_events","type":"Organization","site_admin":false},"repo":{"id":37935024,"name":"election-notification-works","full_name":"democracyworks/election-notification-works","owner":{"login":"democracyworks","id":1373557,"avatar_url":"https://avatars.githubusercontent.com/u/1373557?v=3","gravatar_id":"","url":"https://api.github.com/users/democracyworks","html_url":"https://github.com/democracyworks","followers_url":"https://api.github.com/users/democracyworks/followers","following_url":"https://api.github.com/users/democracyworks/following{/other_user}","gists_url":"https://api.github.com/users/democracyworks/gists{/gist_id}","starred_url":"https://api.github.com/users/democracyworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/democracyworks/subscriptions","organizations_url":"https://api.github.com/users/democracyworks/orgs","repos_url":"https://api.github.com/users/democracyworks/repos","events_url":"https://api.github.com/users/democracyworks/events{/privacy}","received_events_url":"https://api.github.com/users/democracyworks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/democracyworks/election-notification-works","description":"","fork":false,"url":"https://api.github.com/repos/democracyworks/election-notification-works","forks_url":"https://api.github.com/repos/democracyworks/election-notification-works/forks","keys_url":"https://api.github.com/repos/democracyworks/election-notification-works/keys{/key_id}","collaborators_url":"https://api.github.com/repos/democracyworks/election-notification-works/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/democracyworks/election-notification-works/teams","hooks_url":"https://api.github.com/repos/democracyworks/election-notification-works/hooks","issue_events_url":"https://api.github.com/repos/democracyworks/election-notification-works/issues/events{/number}","events_url":"https://api.github.com/repos/democracyworks/election-notification-works/events","assignees_url":"https://api.github.com/repos/democracyworks/election-notification-works/assignees{/user}","branches_url":"https://api.github.com/repos/democracyworks/election-notification-works/branches{/branch}","tags_url":"https://api.github.com/repos/democracyworks/election-notification-works/tags","blobs_url":"https://api.github.com/repos/democracyworks/election-notification-works/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/democracyworks/election-notification-works/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/democracyworks/election-notification-works/git/refs{/sha}","trees_url":"https://api.github.com/repos/democracyworks/election-notification-works/git/trees{/sha}","statuses_url":"https://api.github.com/repos/democracyworks/election-notification-works/statuses/{sha}","languages_url":"https://api.github.com/repos/democracyworks/election-notification-works/languages","stargazers_url":"https://api.github.com/repos/democracyworks/election-notification-works/stargazers","contributors_url":"https://api.github.com/repos/democracyworks/election-notification-works/contributors","subscribers_url":"https://api.github.com/repos/democracyworks/election-notification-works/subscribers","subscription_url":"https://api.github.com/repos/democracyworks/election-notification-works/subscription","commits_url":"https://api.github.com/repos/democracyworks/election-notification-works/commits{/sha}","git_commits_url":"https://api.github.com/repos/democracyworks/election-notification-works/git/commits{/sha}","comments_url":"https://api.github.com/repos/democracyworks/election-notification-works/comments{/number}","issue_comment_url":"https://api.github.com/repos/democracyworks/election-notification-works/issues/comments{/number}","contents_url":"https://api.github.com/repos/democracyworks/election-notification-works/contents/{+path}","compare_url":"https://api.github.com/repos/democracyworks/election-notification-works/compare/{base}...{head}","merges_url":"https://api.github.com/repos/democracyworks/election-notification-works/merges","archive_url":"https://api.github.com/repos/democracyworks/election-notification-works/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/democracyworks/election-notification-works/downloads","issues_url":"https://api.github.com/repos/democracyworks/election-notification-works/issues{/number}","pulls_url":"https://api.github.com/repos/democracyworks/election-notification-works/pulls{/number}","milestones_url":"https://api.github.com/repos/democracyworks/election-notification-works/milestones{/number}","notifications_url":"https://api.github.com/repos/democracyworks/election-notification-works/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/democracyworks/election-notification-works/labels{/name}","releases_url":"https://api.github.com/repos/democracyworks/election-notification-works/releases{/id}","created_at":"2015-06-23T17:50:09Z","updated_at":"2015-06-23T17:50:20Z","pushed_at":"2015-08-27T23:14:28Z","git_url":"git://github.com/democracyworks/election-notification-works.git","ssh_url":"git@github.com:democracyworks/election-notification-works.git","clone_url":"https://github.com/democracyworks/election-notification-works.git","svn_url":"https://github.com/democracyworks/election-notification-works","homepage":null,"size":340,"stargazers_count":0,"watchers_count":0,"language":"Clojure","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/democracyworks/election-notification-works/pulls/14"},"html":{"href":"https://github.com/democracyworks/election-notification-works/pull/14"},"issue":{"href":"https://api.github.com/repos/democracyworks/election-notification-works/issues/14"},"comments":{"href":"https://api.github.com/repos/democracyworks/election-notification-works/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/democracyworks/election-notification-works/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/democracyworks/election-notification-works/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/democracyworks/election-notification-works/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/democracyworks/election-notification-works/statuses/31fa320cd10a586e9bc0f7517c71b768014b93c4"}}}}