{"action":"created","comment":{"url":"https://api.github.com/repos/esl/MongooseIM/pulls/comments/90816573","pull_request_review_id":11329970,"id":90816573,"diff_hunk":"@@ -114,100 +121,129 @@ is_presence_error(Stanza) ->\n     andalso\n     escalus_pred:is_error(<<\"modify\">>, <<\"not-acceptable\">>, Stanza).\n \n+privacy_list({Name, #client{} = Target}) ->\n+    JID = escalus_utils:get_short_jid(Target),\n+    escalus_stanza:privacy_list(Name, list_content(Name, JID));\n privacy_list(Name) ->\n     escalus_stanza:privacy_list(Name, list_content(Name)).\n \n+\n % Geralt is not used by the privacy tests, but lists have to have\n % at least one element so we use him for a no-op.\n list_content(<<\"noop_list\">>) -> [\n-        escalus_stanza:privacy_list_jid_item(<<\"1\">>, <<\"deny\">>, geralt, [])\n-    ];\n-list_content(<<\"deny_bob\">>) -> [\n-        escalus_stanza:privacy_list_jid_item(<<\"1\">>, <<\"deny\">>, bob, [])\n-    ];\n-list_content(<<\"allow_bob\">>) -> [\n-        escalus_stanza:privacy_list_jid_item(<<\"1\">>, <<\"allow\">>, bob, [])\n-    ];\n-list_content(<<\"deny_bob_message\">>) -> [\n-        escalus_stanza:privacy_list_jid_item(<<\"1\">>, <<\"deny\">>, bob, [<<\"message\">>])\n+        escalus_stanza:privacy_list_jid_item(<<\"1\">>, <<\"deny\">>,\n+            <<\"geralt@localhost\">>, [])\n     ];\n list_content(<<\"deny_group_message\">>) -> [\n-        escalus_stanza:privacy_list_item(<<\"1\">>, <<\"deny\">>, <<\"group\">>, <<\"ignored\">>, [<<\"message\">>])\n+        escalus_stanza:privacy_list_item(<<\"1\">>, <<\"deny\">>, <<\"group\">>,\n+            <<\"ignored\">>, [<<\"message\">>])\n     ];\n list_content(<<\"deny_unsubscribed_message\">>) -> [\n-        escalus_stanza:privacy_list_item(<<\"1\">>, <<\"deny\">>, <<\"subscription\">>, <<\"none\">>, [<<\"message\">>])\n+        escalus_stanza:privacy_list_item(<<\"1\">>, <<\"deny\">>, <<\"subscription\">>,\n+            <<\"none\">>, [<<\"message\">>])\n     ];\n list_content(<<\"deny_all_message\">>) -> [\n         escalus_stanza:privacy_list_item(<<\"1\">>, <<\"deny\">>, [<<\"message\">>])\n     ];\n list_content(<<\"deny_all_message_but_subscription_from\">>) -> [\n-        escalus_stanza:privacy_list_item(<<\"1\">>, <<\"allow\">>, <<\"subscription\">>, <<\"from\">>, [<<\"message\">>]),\n+        escalus_stanza:privacy_list_item(<<\"1\">>, <<\"allow\">>, <<\"subscription\">>,\n+            <<\"from\">>, [<<\"message\">>]),\n         escalus_stanza:privacy_list_item(<<\"2\">>, <<\"deny\">>, [<<\"message\">>])\n     ];\n list_content(<<\"deny_all_message_but_subscription_to\">>) -> [\n-        escalus_stanza:privacy_list_item(<<\"1\">>, <<\"allow\">>, <<\"subscription\">>, <<\"to\">>, [<<\"message\">>]),\n+        escalus_stanza:privacy_list_item(<<\"1\">>, <<\"allow\">>, <<\"subscription\">>,\n+            <<\"to\">>, [<<\"message\">>]),\n         escalus_stanza:privacy_list_item(<<\"2\">>, <<\"deny\">>, [<<\"message\">>])\n     ];\n list_content(<<\"deny_all_message_but_subscription_both\">>) -> [\n-        escalus_stanza:privacy_list_item(<<\"1\">>, <<\"allow\">>, <<\"subscription\">>, <<\"both\">>, [<<\"message\">>]),\n+        escalus_stanza:privacy_list_item(<<\"1\">>, <<\"allow\">>, <<\"subscription\">>,\n+            <<\"both\">>, [<<\"message\">>]),","path":"test/ejabberd_tests/tests/privacy_helper.erl","position":81,"original_position":81,"commit_id":"1b27b75cea23a6cc481a89bfa0c3db8eb7c293f7","original_commit_id":"1b27b75cea23a6cc481a89bfa0c3db8eb7c293f7","user":{"login":"michalwski","id":705828,"avatar_url":"https://avatars.githubusercontent.com/u/705828?v=3","gravatar_id":"","url":"https://api.github.com/users/michalwski","html_url":"https://github.com/michalwski","followers_url":"https://api.github.com/users/michalwski/followers","following_url":"https://api.github.com/users/michalwski/following{/other_user}","gists_url":"https://api.github.com/users/michalwski/gists{/gist_id}","starred_url":"https://api.github.com/users/michalwski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalwski/subscriptions","organizations_url":"https://api.github.com/users/michalwski/orgs","repos_url":"https://api.github.com/users/michalwski/repos","events_url":"https://api.github.com/users/michalwski/events{/privacy}","received_events_url":"https://api.github.com/users/michalwski/received_events","type":"User","site_admin":false},"body":"It's the last one re indentation but there are similar lines below. Hope you'll find them.","created_at":"2016-12-05T08:03:53Z","updated_at":"2016-12-05T08:05:24Z","html_url":"https://github.com/esl/MongooseIM/pull/1096#discussion_r90816573","pull_request_url":"https://api.github.com/repos/esl/MongooseIM/pulls/1096","_links":{"self":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/comments/90816573"},"html":{"href":"https://github.com/esl/MongooseIM/pull/1096#discussion_r90816573"},"pull_request":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/1096"}}},"pull_request":{"url":"https://api.github.com/repos/esl/MongooseIM/pulls/1096","id":96245195,"html_url":"https://github.com/esl/MongooseIM/pull/1096","diff_url":"https://github.com/esl/MongooseIM/pull/1096.diff","patch_url":"https://github.com/esl/MongooseIM/pull/1096.patch","issue_url":"https://api.github.com/repos/esl/MongooseIM/issues/1096","number":1096,"state":"open","locked":false,"title":"Remove escalus warnings in privacy_SUITE","user":{"login":"arkgil","id":11610769,"avatar_url":"https://avatars.githubusercontent.com/u/11610769?v=3","gravatar_id":"","url":"https://api.github.com/users/arkgil","html_url":"https://github.com/arkgil","followers_url":"https://api.github.com/users/arkgil/followers","following_url":"https://api.github.com/users/arkgil/following{/other_user}","gists_url":"https://api.github.com/users/arkgil/gists{/gist_id}","starred_url":"https://api.github.com/users/arkgil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arkgil/subscriptions","organizations_url":"https://api.github.com/users/arkgil/orgs","repos_url":"https://api.github.com/users/arkgil/repos","events_url":"https://api.github.com/users/arkgil/events{/privacy}","received_events_url":"https://api.github.com/users/arkgil/received_events","type":"User","site_admin":false},"body":"This PR removes warnings emitted by escalus when running privacy_SUITE.\r\n\r\nSince [this commit](https://github.com/esl/escalus/commit/93ee6eef1cce80ae7d1213c62b31cfebe301b11f) escalus prints warning whenever we try to lookup JID by atom representing user in config file.\r\n\r\nProposed changes include:\r\n* removed sending stanzas to recipients defined by atoms in `privacy_SUITE`\r\n* removed setting privacy lists' targets  as atoms in `privacy_helpers` module\r\n","created_at":"2016-12-02T09:18:12Z","updated_at":"2016-12-05T08:05:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7a258ac9e9d60800714c664e72b28f90f365c90d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/esl/MongooseIM/pulls/1096/commits","review_comments_url":"https://api.github.com/repos/esl/MongooseIM/pulls/1096/comments","review_comment_url":"https://api.github.com/repos/esl/MongooseIM/pulls/comments{/number}","comments_url":"https://api.github.com/repos/esl/MongooseIM/issues/1096/comments","statuses_url":"https://api.github.com/repos/esl/MongooseIM/statuses/1b27b75cea23a6cc481a89bfa0c3db8eb7c293f7","head":{"label":"esl:remove-jid-lookup-by-atoms","ref":"remove-jid-lookup-by-atoms","sha":"1b27b75cea23a6cc481a89bfa0c3db8eb7c293f7","user":{"login":"esl","id":283412,"avatar_url":"https://avatars.githubusercontent.com/u/283412?v=3","gravatar_id":"","url":"https://api.github.com/users/esl","html_url":"https://github.com/esl","followers_url":"https://api.github.com/users/esl/followers","following_url":"https://api.github.com/users/esl/following{/other_user}","gists_url":"https://api.github.com/users/esl/gists{/gist_id}","starred_url":"https://api.github.com/users/esl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esl/subscriptions","organizations_url":"https://api.github.com/users/esl/orgs","repos_url":"https://api.github.com/users/esl/repos","events_url":"https://api.github.com/users/esl/events{/privacy}","received_events_url":"https://api.github.com/users/esl/received_events","type":"Organization","site_admin":false},"repo":{"id":2354240,"name":"MongooseIM","full_name":"esl/MongooseIM","owner":{"login":"esl","id":283412,"avatar_url":"https://avatars.githubusercontent.com/u/283412?v=3","gravatar_id":"","url":"https://api.github.com/users/esl","html_url":"https://github.com/esl","followers_url":"https://api.github.com/users/esl/followers","following_url":"https://api.github.com/users/esl/following{/other_user}","gists_url":"https://api.github.com/users/esl/gists{/gist_id}","starred_url":"https://api.github.com/users/esl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esl/subscriptions","organizations_url":"https://api.github.com/users/esl/orgs","repos_url":"https://api.github.com/users/esl/repos","events_url":"https://api.github.com/users/esl/events{/privacy}","received_events_url":"https://api.github.com/users/esl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/esl/MongooseIM","description":"MongooseIM is a mobile messaging platform with focus on performance and scalability","fork":false,"url":"https://api.github.com/repos/esl/MongooseIM","forks_url":"https://api.github.com/repos/esl/MongooseIM/forks","keys_url":"https://api.github.com/repos/esl/MongooseIM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/esl/MongooseIM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/esl/MongooseIM/teams","hooks_url":"https://api.github.com/repos/esl/MongooseIM/hooks","issue_events_url":"https://api.github.com/repos/esl/MongooseIM/issues/events{/number}","events_url":"https://api.github.com/repos/esl/MongooseIM/events","assignees_url":"https://api.github.com/repos/esl/MongooseIM/assignees{/user}","branches_url":"https://api.github.com/repos/esl/MongooseIM/branches{/branch}","tags_url":"https://api.github.com/repos/esl/MongooseIM/tags","blobs_url":"https://api.github.com/repos/esl/MongooseIM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/esl/MongooseIM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/esl/MongooseIM/git/refs{/sha}","trees_url":"https://api.github.com/repos/esl/MongooseIM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/esl/MongooseIM/statuses/{sha}","languages_url":"https://api.github.com/repos/esl/MongooseIM/languages","stargazers_url":"https://api.github.com/repos/esl/MongooseIM/stargazers","contributors_url":"https://api.github.com/repos/esl/MongooseIM/contributors","subscribers_url":"https://api.github.com/repos/esl/MongooseIM/subscribers","subscription_url":"https://api.github.com/repos/esl/MongooseIM/subscription","commits_url":"https://api.github.com/repos/esl/MongooseIM/commits{/sha}","git_commits_url":"https://api.github.com/repos/esl/MongooseIM/git/commits{/sha}","comments_url":"https://api.github.com/repos/esl/MongooseIM/comments{/number}","issue_comment_url":"https://api.github.com/repos/esl/MongooseIM/issues/comments{/number}","contents_url":"https://api.github.com/repos/esl/MongooseIM/contents/{+path}","compare_url":"https://api.github.com/repos/esl/MongooseIM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/esl/MongooseIM/merges","archive_url":"https://api.github.com/repos/esl/MongooseIM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/esl/MongooseIM/downloads","issues_url":"https://api.github.com/repos/esl/MongooseIM/issues{/number}","pulls_url":"https://api.github.com/repos/esl/MongooseIM/pulls{/number}","milestones_url":"https://api.github.com/repos/esl/MongooseIM/milestones{/number}","notifications_url":"https://api.github.com/repos/esl/MongooseIM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/esl/MongooseIM/labels{/name}","releases_url":"https://api.github.com/repos/esl/MongooseIM/releases{/id}","deployments_url":"https://api.github.com/repos/esl/MongooseIM/deployments","created_at":"2011-09-09T08:19:18Z","updated_at":"2016-12-05T05:20:48Z","pushed_at":"2016-12-05T07:20:09Z","git_url":"git://github.com/esl/MongooseIM.git","ssh_url":"git@github.com:esl/MongooseIM.git","clone_url":"https://github.com/esl/MongooseIM.git","svn_url":"https://github.com/esl/MongooseIM","homepage":"","size":33840,"stargazers_count":626,"watchers_count":626,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":244,"mirror_url":null,"open_issues_count":98,"forks":244,"open_issues":98,"watchers":626,"default_branch":"master"}},"base":{"label":"esl:master","ref":"master","sha":"d20ec88346cc339793ea24e4e39920fb5fb1d727","user":{"login":"esl","id":283412,"avatar_url":"https://avatars.githubusercontent.com/u/283412?v=3","gravatar_id":"","url":"https://api.github.com/users/esl","html_url":"https://github.com/esl","followers_url":"https://api.github.com/users/esl/followers","following_url":"https://api.github.com/users/esl/following{/other_user}","gists_url":"https://api.github.com/users/esl/gists{/gist_id}","starred_url":"https://api.github.com/users/esl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esl/subscriptions","organizations_url":"https://api.github.com/users/esl/orgs","repos_url":"https://api.github.com/users/esl/repos","events_url":"https://api.github.com/users/esl/events{/privacy}","received_events_url":"https://api.github.com/users/esl/received_events","type":"Organization","site_admin":false},"repo":{"id":2354240,"name":"MongooseIM","full_name":"esl/MongooseIM","owner":{"login":"esl","id":283412,"avatar_url":"https://avatars.githubusercontent.com/u/283412?v=3","gravatar_id":"","url":"https://api.github.com/users/esl","html_url":"https://github.com/esl","followers_url":"https://api.github.com/users/esl/followers","following_url":"https://api.github.com/users/esl/following{/other_user}","gists_url":"https://api.github.com/users/esl/gists{/gist_id}","starred_url":"https://api.github.com/users/esl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esl/subscriptions","organizations_url":"https://api.github.com/users/esl/orgs","repos_url":"https://api.github.com/users/esl/repos","events_url":"https://api.github.com/users/esl/events{/privacy}","received_events_url":"https://api.github.com/users/esl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/esl/MongooseIM","description":"MongooseIM is a mobile messaging platform with focus on performance and scalability","fork":false,"url":"https://api.github.com/repos/esl/MongooseIM","forks_url":"https://api.github.com/repos/esl/MongooseIM/forks","keys_url":"https://api.github.com/repos/esl/MongooseIM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/esl/MongooseIM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/esl/MongooseIM/teams","hooks_url":"https://api.github.com/repos/esl/MongooseIM/hooks","issue_events_url":"https://api.github.com/repos/esl/MongooseIM/issues/events{/number}","events_url":"https://api.github.com/repos/esl/MongooseIM/events","assignees_url":"https://api.github.com/repos/esl/MongooseIM/assignees{/user}","branches_url":"https://api.github.com/repos/esl/MongooseIM/branches{/branch}","tags_url":"https://api.github.com/repos/esl/MongooseIM/tags","blobs_url":"https://api.github.com/repos/esl/MongooseIM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/esl/MongooseIM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/esl/MongooseIM/git/refs{/sha}","trees_url":"https://api.github.com/repos/esl/MongooseIM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/esl/MongooseIM/statuses/{sha}","languages_url":"https://api.github.com/repos/esl/MongooseIM/languages","stargazers_url":"https://api.github.com/repos/esl/MongooseIM/stargazers","contributors_url":"https://api.github.com/repos/esl/MongooseIM/contributors","subscribers_url":"https://api.github.com/repos/esl/MongooseIM/subscribers","subscription_url":"https://api.github.com/repos/esl/MongooseIM/subscription","commits_url":"https://api.github.com/repos/esl/MongooseIM/commits{/sha}","git_commits_url":"https://api.github.com/repos/esl/MongooseIM/git/commits{/sha}","comments_url":"https://api.github.com/repos/esl/MongooseIM/comments{/number}","issue_comment_url":"https://api.github.com/repos/esl/MongooseIM/issues/comments{/number}","contents_url":"https://api.github.com/repos/esl/MongooseIM/contents/{+path}","compare_url":"https://api.github.com/repos/esl/MongooseIM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/esl/MongooseIM/merges","archive_url":"https://api.github.com/repos/esl/MongooseIM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/esl/MongooseIM/downloads","issues_url":"https://api.github.com/repos/esl/MongooseIM/issues{/number}","pulls_url":"https://api.github.com/repos/esl/MongooseIM/pulls{/number}","milestones_url":"https://api.github.com/repos/esl/MongooseIM/milestones{/number}","notifications_url":"https://api.github.com/repos/esl/MongooseIM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/esl/MongooseIM/labels{/name}","releases_url":"https://api.github.com/repos/esl/MongooseIM/releases{/id}","deployments_url":"https://api.github.com/repos/esl/MongooseIM/deployments","created_at":"2011-09-09T08:19:18Z","updated_at":"2016-12-05T05:20:48Z","pushed_at":"2016-12-05T07:20:09Z","git_url":"git://github.com/esl/MongooseIM.git","ssh_url":"git@github.com:esl/MongooseIM.git","clone_url":"https://github.com/esl/MongooseIM.git","svn_url":"https://github.com/esl/MongooseIM","homepage":"","size":33840,"stargazers_count":626,"watchers_count":626,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":244,"mirror_url":null,"open_issues_count":98,"forks":244,"open_issues":98,"watchers":626,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/1096"},"html":{"href":"https://github.com/esl/MongooseIM/pull/1096"},"issue":{"href":"https://api.github.com/repos/esl/MongooseIM/issues/1096"},"comments":{"href":"https://api.github.com/repos/esl/MongooseIM/issues/1096/comments"},"review_comments":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/1096/comments"},"review_comment":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/1096/commits"},"statuses":{"href":"https://api.github.com/repos/esl/MongooseIM/statuses/1b27b75cea23a6cc481a89bfa0c3db8eb7c293f7"}}}}
{"actor":{"display_login":"michalwski"}}