{"action":"created","comment":{"url":"https://api.github.com/repos/matrix-org/synapse/pulls/comments/46805137","id":46805137,"diff_hunk":"@@ -207,7 +207,12 @@ def on_OPTIONS(self, _):\n \n     def set_rule_attr(self, user_name, spec, val):\n         if spec['attr'] == 'enabled':\n+            if isinstance(val, dict) and \"enabled\" in val:\n+                return self.set_rule_attr(user_name, spec, val[\"enabled\"])","path":"synapse/rest/client/v1/push_rule.py","position":5,"original_position":5,"commit_id":"90a5341361569814fe6cf1774b6fd703d7c3d2ce","original_commit_id":"90a5341361569814fe6cf1774b6fd703d7c3d2ce","user":{"login":"richvdh","id":1389908,"avatar_url":"https://avatars.githubusercontent.com/u/1389908?v=3","gravatar_id":"","url":"https://api.github.com/users/richvdh","html_url":"https://github.com/richvdh","followers_url":"https://api.github.com/users/richvdh/followers","following_url":"https://api.github.com/users/richvdh/following{/other_user}","gists_url":"https://api.github.com/users/richvdh/gists{/gist_id}","starred_url":"https://api.github.com/users/richvdh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richvdh/subscriptions","organizations_url":"https://api.github.com/users/richvdh/orgs","repos_url":"https://api.github.com/users/richvdh/repos","events_url":"https://api.github.com/users/richvdh/events{/privacy}","received_events_url":"https://api.github.com/users/richvdh/received_events","type":"User","site_admin":false},"body":"wouldn't `val = val[\"enabled\"]` be clearer/easier than recursion here?","created_at":"2015-12-07T10:23:15Z","updated_at":"2015-12-07T10:23:15Z","html_url":"https://github.com/matrix-org/synapse/pull/424#discussion_r46805137","pull_request_url":"https://api.github.com/repos/matrix-org/synapse/pulls/424","_links":{"self":{"href":"https://api.github.com/repos/matrix-org/synapse/pulls/comments/46805137"},"html":{"href":"https://github.com/matrix-org/synapse/pull/424#discussion_r46805137"},"pull_request":{"href":"https://api.github.com/repos/matrix-org/synapse/pulls/424"}}},"pull_request":{"url":"https://api.github.com/repos/matrix-org/synapse/pulls/424","id":52699705,"html_url":"https://github.com/matrix-org/synapse/pull/424","diff_url":"https://github.com/matrix-org/synapse/pull/424.diff","patch_url":"https://github.com/matrix-org/synapse/pull/424.patch","issue_url":"https://api.github.com/repos/matrix-org/synapse/issues/424","number":424,"state":"open","locked":false,"title":"Take object not bool","user":{"login":"illicitonion","id":1131704,"avatar_url":"https://avatars.githubusercontent.com/u/1131704?v=3","gravatar_id":"","url":"https://api.github.com/users/illicitonion","html_url":"https://github.com/illicitonion","followers_url":"https://api.github.com/users/illicitonion/followers","following_url":"https://api.github.com/users/illicitonion/following{/other_user}","gists_url":"https://api.github.com/users/illicitonion/gists{/gist_id}","starred_url":"https://api.github.com/users/illicitonion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/illicitonion/subscriptions","organizations_url":"https://api.github.com/users/illicitonion/orgs","repos_url":"https://api.github.com/users/illicitonion/repos","events_url":"https://api.github.com/users/illicitonion/events{/privacy}","received_events_url":"https://api.github.com/users/illicitonion/received_events","type":"User","site_admin":false},"body":"Allows bool as legacy fallback\r\n\r\nSee https://github.com/matrix-org/matrix-doc/pull/212","created_at":"2015-12-04T17:49:08Z","updated_at":"2015-12-07T10:23:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3335c00a888d8d858858215c89a6fcef543d6bd6","assignee":{"login":"richvdh","id":1389908,"avatar_url":"https://avatars.githubusercontent.com/u/1389908?v=3","gravatar_id":"","url":"https://api.github.com/users/richvdh","html_url":"https://github.com/richvdh","followers_url":"https://api.github.com/users/richvdh/followers","following_url":"https://api.github.com/users/richvdh/following{/other_user}","gists_url":"https://api.github.com/users/richvdh/gists{/gist_id}","starred_url":"https://api.github.com/users/richvdh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richvdh/subscriptions","organizations_url":"https://api.github.com/users/richvdh/orgs","repos_url":"https://api.github.com/users/richvdh/repos","events_url":"https://api.github.com/users/richvdh/events{/privacy}","received_events_url":"https://api.github.com/users/richvdh/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/matrix-org/synapse/pulls/424/commits","review_comments_url":"https://api.github.com/repos/matrix-org/synapse/pulls/424/comments","review_comment_url":"https://api.github.com/repos/matrix-org/synapse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/matrix-org/synapse/issues/424/comments","statuses_url":"https://api.github.com/repos/matrix-org/synapse/statuses/90a5341361569814fe6cf1774b6fd703d7c3d2ce","head":{"label":"matrix-org:daniel/pushdictification","ref":"daniel/pushdictification","sha":"90a5341361569814fe6cf1774b6fd703d7c3d2ce","user":{"login":"matrix-org","id":8418310,"avatar_url":"https://avatars.githubusercontent.com/u/8418310?v=3","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"repo":{"id":22844864,"name":"synapse","full_name":"matrix-org/synapse","owner":{"login":"matrix-org","id":8418310,"avatar_url":"https://avatars.githubusercontent.com/u/8418310?v=3","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/matrix-org/synapse","description":"Synapse: Matrix reference homeserver","fork":false,"url":"https://api.github.com/repos/matrix-org/synapse","forks_url":"https://api.github.com/repos/matrix-org/synapse/forks","keys_url":"https://api.github.com/repos/matrix-org/synapse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matrix-org/synapse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matrix-org/synapse/teams","hooks_url":"https://api.github.com/repos/matrix-org/synapse/hooks","issue_events_url":"https://api.github.com/repos/matrix-org/synapse/issues/events{/number}","events_url":"https://api.github.com/repos/matrix-org/synapse/events","assignees_url":"https://api.github.com/repos/matrix-org/synapse/assignees{/user}","branches_url":"https://api.github.com/repos/matrix-org/synapse/branches{/branch}","tags_url":"https://api.github.com/repos/matrix-org/synapse/tags","blobs_url":"https://api.github.com/repos/matrix-org/synapse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matrix-org/synapse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matrix-org/synapse/git/refs{/sha}","trees_url":"https://api.github.com/repos/matrix-org/synapse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matrix-org/synapse/statuses/{sha}","languages_url":"https://api.github.com/repos/matrix-org/synapse/languages","stargazers_url":"https://api.github.com/repos/matrix-org/synapse/stargazers","contributors_url":"https://api.github.com/repos/matrix-org/synapse/contributors","subscribers_url":"https://api.github.com/repos/matrix-org/synapse/subscribers","subscription_url":"https://api.github.com/repos/matrix-org/synapse/subscription","commits_url":"https://api.github.com/repos/matrix-org/synapse/commits{/sha}","git_commits_url":"https://api.github.com/repos/matrix-org/synapse/git/commits{/sha}","comments_url":"https://api.github.com/repos/matrix-org/synapse/comments{/number}","issue_comment_url":"https://api.github.com/repos/matrix-org/synapse/issues/comments{/number}","contents_url":"https://api.github.com/repos/matrix-org/synapse/contents/{+path}","compare_url":"https://api.github.com/repos/matrix-org/synapse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matrix-org/synapse/merges","archive_url":"https://api.github.com/repos/matrix-org/synapse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matrix-org/synapse/downloads","issues_url":"https://api.github.com/repos/matrix-org/synapse/issues{/number}","pulls_url":"https://api.github.com/repos/matrix-org/synapse/pulls{/number}","milestones_url":"https://api.github.com/repos/matrix-org/synapse/milestones{/number}","notifications_url":"https://api.github.com/repos/matrix-org/synapse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matrix-org/synapse/labels{/name}","releases_url":"https://api.github.com/repos/matrix-org/synapse/releases{/id}","created_at":"2014-08-11T15:51:42Z","updated_at":"2015-12-05T14:36:01Z","pushed_at":"2015-12-06T20:55:44Z","git_url":"git://github.com/matrix-org/synapse.git","ssh_url":"git@github.com:matrix-org/synapse.git","clone_url":"https://github.com/matrix-org/synapse.git","svn_url":"https://github.com/matrix-org/synapse","homepage":"http://matrix.org","size":8362,"stargazers_count":614,"watchers_count":614,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":60,"mirror_url":null,"open_issues_count":9,"forks":60,"open_issues":9,"watchers":614,"default_branch":"master"}},"base":{"label":"matrix-org:develop","ref":"develop","sha":"262a97f02ba96a064bae340c3f7f6791bcd66642","user":{"login":"matrix-org","id":8418310,"avatar_url":"https://avatars.githubusercontent.com/u/8418310?v=3","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"repo":{"id":22844864,"name":"synapse","full_name":"matrix-org/synapse","owner":{"login":"matrix-org","id":8418310,"avatar_url":"https://avatars.githubusercontent.com/u/8418310?v=3","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/matrix-org/synapse","description":"Synapse: Matrix reference homeserver","fork":false,"url":"https://api.github.com/repos/matrix-org/synapse","forks_url":"https://api.github.com/repos/matrix-org/synapse/forks","keys_url":"https://api.github.com/repos/matrix-org/synapse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matrix-org/synapse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matrix-org/synapse/teams","hooks_url":"https://api.github.com/repos/matrix-org/synapse/hooks","issue_events_url":"https://api.github.com/repos/matrix-org/synapse/issues/events{/number}","events_url":"https://api.github.com/repos/matrix-org/synapse/events","assignees_url":"https://api.github.com/repos/matrix-org/synapse/assignees{/user}","branches_url":"https://api.github.com/repos/matrix-org/synapse/branches{/branch}","tags_url":"https://api.github.com/repos/matrix-org/synapse/tags","blobs_url":"https://api.github.com/repos/matrix-org/synapse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matrix-org/synapse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matrix-org/synapse/git/refs{/sha}","trees_url":"https://api.github.com/repos/matrix-org/synapse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matrix-org/synapse/statuses/{sha}","languages_url":"https://api.github.com/repos/matrix-org/synapse/languages","stargazers_url":"https://api.github.com/repos/matrix-org/synapse/stargazers","contributors_url":"https://api.github.com/repos/matrix-org/synapse/contributors","subscribers_url":"https://api.github.com/repos/matrix-org/synapse/subscribers","subscription_url":"https://api.github.com/repos/matrix-org/synapse/subscription","commits_url":"https://api.github.com/repos/matrix-org/synapse/commits{/sha}","git_commits_url":"https://api.github.com/repos/matrix-org/synapse/git/commits{/sha}","comments_url":"https://api.github.com/repos/matrix-org/synapse/comments{/number}","issue_comment_url":"https://api.github.com/repos/matrix-org/synapse/issues/comments{/number}","contents_url":"https://api.github.com/repos/matrix-org/synapse/contents/{+path}","compare_url":"https://api.github.com/repos/matrix-org/synapse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matrix-org/synapse/merges","archive_url":"https://api.github.com/repos/matrix-org/synapse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matrix-org/synapse/downloads","issues_url":"https://api.github.com/repos/matrix-org/synapse/issues{/number}","pulls_url":"https://api.github.com/repos/matrix-org/synapse/pulls{/number}","milestones_url":"https://api.github.com/repos/matrix-org/synapse/milestones{/number}","notifications_url":"https://api.github.com/repos/matrix-org/synapse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matrix-org/synapse/labels{/name}","releases_url":"https://api.github.com/repos/matrix-org/synapse/releases{/id}","created_at":"2014-08-11T15:51:42Z","updated_at":"2015-12-05T14:36:01Z","pushed_at":"2015-12-06T20:55:44Z","git_url":"git://github.com/matrix-org/synapse.git","ssh_url":"git@github.com:matrix-org/synapse.git","clone_url":"https://github.com/matrix-org/synapse.git","svn_url":"https://github.com/matrix-org/synapse","homepage":"http://matrix.org","size":8362,"stargazers_count":614,"watchers_count":614,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":60,"mirror_url":null,"open_issues_count":9,"forks":60,"open_issues":9,"watchers":614,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/matrix-org/synapse/pulls/424"},"html":{"href":"https://github.com/matrix-org/synapse/pull/424"},"issue":{"href":"https://api.github.com/repos/matrix-org/synapse/issues/424"},"comments":{"href":"https://api.github.com/repos/matrix-org/synapse/issues/424/comments"},"review_comments":{"href":"https://api.github.com/repos/matrix-org/synapse/pulls/424/comments"},"review_comment":{"href":"https://api.github.com/repos/matrix-org/synapse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/matrix-org/synapse/pulls/424/commits"},"statuses":{"href":"https://api.github.com/repos/matrix-org/synapse/statuses/90a5341361569814fe6cf1774b6fd703d7c3d2ce"}}}}