payload: {"action":"created","comment":{"url":"https://api.github.com/repos/decred/politeia/pulls/comments/320470143","pull_request_review_id":283239148,"id":320470143,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMyMDQ3MDE0Mw==","diff_hunk":"@@ -538,3 +574,273 @@ func (p *politeiawww) processGetDCCs(gds cms.GetDCCs) (*cms.GetDCCsReply, error)\n \t\tDCCs: dccs,\n \t}, nil\n }\n+\n+func (p *politeiawww) processSupportOpposeDCC(sd cms.SupportOpposeDCC, u *user.User) (*cms.SupportOpposeDCCReply, error) {\n+\tlog.Tracef(\"processSupportOpposeDCC: %v %v\", sd.Token, u.ID)\n+\n+\tdcc, err := p.getDCC(sd.Token)\n+\tif err != nil {\n+\t\tif err == cache.ErrRecordNotFound {\n+\t\t\terr = www.UserError{\n+\t\t\t\tErrorCode: cms.ErrorStatusInvoiceNotFound,\n+\t\t\t}\n+\t\t}\n+\t\treturn nil, err\n+\t}\n+\n+\tif sd.Vote != supportString && sd.Vote != opposeString {\n+\t\treturn nil, www.UserError{\n+\t\t\tErrorCode: www.ErrorStatusUserActionNotAllowed,\n+\t\t}\n+\t}\n+\t// Check to make sure the user has not SupportOpposeed or Opposed this DCC yet\n+\tif stringInSlice(dcc.SupportUserIDs, u.ID.String()) ||\n+\t\tstringInSlice(dcc.OppositionUserIDs, u.ID.String()) {\n+\t\treturn nil, www.UserError{\n+\t\t\tErrorCode: www.ErrorStatusUserActionNotAllowed,\n+\t\t}\n+\t}\n+\n+\t// Check to make sure the user is not the author of the DCC.\n+\tif dcc.SponsorUserID == u.ID.String() {\n+\t\treturn nil, www.UserError{\n+\t\t\tErrorCode: www.ErrorStatusUserActionNotAllowed,\n+\t\t}\n+\t}\n+\n+\t// Check to make sure that the DCC is still active\n+\tif dcc.Status != cms.DCCStatusActive {\n+\t\treturn nil, www.UserError{\n+\t\t\tErrorCode: cms.ErrorStatusCannotCommentOnDCC,","path":"politeiawww/dcc.go","position":203,"original_position":203,"commit_id":"fb8c1fc4c3e74667e35174ff0fdae4383014dcdb","original_commit_id":"fb8c1fc4c3e74667e35174ff0fdae4383014dcdb","user":{"login":"lukebp","id":9039877,"node_id":"MDQ6VXNlcjkwMzk4Nzc=","avatar_url":"https://avatars3.githubusercontent.com/u/9039877?v=4","gravatar_id":"","url":"https://api.github.com/users/lukebp","html_url":"https://github.com/lukebp","followers_url":"https://api.github.com/users/lukebp/followers","following_url":"https://api.github.com/users/lukebp/following{/other_user}","gists_url":"https://api.github.com/users/lukebp/gists{/gist_id}","starred_url":"https://api.github.com/users/lukebp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukebp/subscriptions","organizations_url":"https://api.github.com/users/lukebp/orgs","repos_url":"https://api.github.com/users/lukebp/repos","events_url":"https://api.github.com/users/lukebp/events{/privacy}","received_events_url":"https://api.github.com/users/lukebp/received_events","type":"User","site_admin":false},"body":"Doesn't make sense.","created_at":"2019-09-03T20:45:07Z","updated_at":"2019-09-03T20:55:16Z","html_url":"https://github.com/decred/politeia/pull/981#discussion_r320470143","pull_request_url":"https://api.github.com/repos/decred/politeia/pulls/981","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/decred/politeia/pulls/comments/320470143"},"html":{"href":"https://github.com/decred/politeia/pull/981#discussion_r320470143"},"pull_request":{"href":"https://api.github.com/repos/decred/politeia/pulls/981"}}},"pull_request":{"url":"https://api.github.com/repos/decred/politeia/pulls/981","id":309115035,"node_id":"MDExOlB1bGxSZXF1ZXN0MzA5MTE1MDM1","html_url":"https://github.com/decred/politeia/pull/981","diff_url":"https://github.com/decred/politeia/pull/981.diff","patch_url":"https://github.com/decred/politeia/pull/981.patch","issue_url":"https://api.github.com/repos/decred/politeia/issues/981","number":981,"state":"open","locked":false,"title":"[cms] Add Support, Oppose and Comment DCC functionality","user":{"login":"alexlyp","id":4388501,"node_id":"MDQ6VXNlcjQzODg1MDE=","avatar_url":"https://avatars0.githubusercontent.com/u/4388501?v=4","gravatar_id":"","url":"https://api.github.com/users/alexlyp","html_url":"https://github.com/alexlyp","followers_url":"https://api.github.com/users/alexlyp/followers","following_url":"https://api.github.com/users/alexlyp/following{/other_user}","gists_url":"https://api.github.com/users/alexlyp/gists{/gist_id}","starred_url":"https://api.github.com/users/alexlyp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexlyp/subscriptions","organizations_url":"https://api.github.com/users/alexlyp/orgs","repos_url":"https://api.github.com/users/alexlyp/repos","events_url":"https://api.github.com/users/alexlyp/events{/privacy}","received_events_url":"https://api.github.com/users/alexlyp/received_events","type":"User","site_admin":false},"body":"Requires https://github.com/decred/politeia/pull/980\r\n\r\nThis PR adds the ability for users to offer their support, opposition\r\nand comment on active DCC proposals (issuances or revocations).\r\n\r\nAll 3 of these requests utilize the pre-existing Commenting subsystem.\r\n\r\nSupport of a DCC is simply a comment \"aye,\" whereas Opposition to a DCC\r\nis \"nay.\"  Sponsors and nominees of a given DCC are allowed to comment, but\r\nnot offer support or opposition.  Users may only support or oppose(exclusive) a DCC once.","created_at":"2019-08-20T15:43:04Z","updated_at":"2019-09-03T20:55:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"84f6542882d468a19564aecaaf3fdfeed3773588","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/decred/politeia/pulls/981/commits","review_comments_url":"https://api.github.com/repos/decred/politeia/pulls/981/comments","review_comment_url":"https://api.github.com/repos/decred/politeia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/decred/politeia/issues/981/comments","statuses_url":"https://api.github.com/repos/decred/politeia/statuses/fb8c1fc4c3e74667e35174ff0fdae4383014dcdb","head":{"label":"alexlyp:ayp_dcc_2","ref":"ayp_dcc_2","sha":"fb8c1fc4c3e74667e35174ff0fdae4383014dcdb","user":{"login":"alexlyp","id":4388501,"node_id":"MDQ6VXNlcjQzODg1MDE=","avatar_url":"https://avatars0.githubusercontent.com/u/4388501?v=4","gravatar_id":"","url":"https://api.github.com/users/alexlyp","html_url":"https://github.com/alexlyp","followers_url":"https://api.github.com/users/alexlyp/followers","following_url":"https://api.github.com/users/alexlyp/following{/other_user}","gists_url":"https://api.github.com/users/alexlyp/gists{/gist_id}","starred_url":"https://api.github.com/users/alexlyp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexlyp/subscriptions","organizations_url":"https://api.github.com/users/alexlyp/orgs","repos_url":"https://api.github.com/users/alexlyp/repos","events_url":"https://api.github.com/users/alexlyp/events{/privacy}","received_events_url":"https://api.github.com/users/alexlyp/received_events","type":"User","site_admin":false},"repo":{"id":172572836,"node_id":"MDEwOlJlcG9zaXRvcnkxNzI1NzI4MzY=","name":"politeia","full_name":"alexlyp/politeia","private":false,"owner":{"login":"alexlyp","id":4388501,"node_id":"MDQ6VXNlcjQzODg1MDE=","avatar_url":"https://avatars0.githubusercontent.com/u/4388501?v=4","gravatar_id":"","url":"https://api.github.com/users/alexlyp","html_url":"https://github.com/alexlyp","followers_url":"https://api.github.com/users/alexlyp/followers","following_url":"https://api.github.com/users/alexlyp/following{/other_user}","gists_url":"https://api.github.com/users/alexlyp/gists{/gist_id}","starred_url":"https://api.github.com/users/alexlyp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexlyp/subscriptions","organizations_url":"https://api.github.com/users/alexlyp/orgs","repos_url":"https://api.github.com/users/alexlyp/repos","events_url":"https://api.github.com/users/alexlyp/events{/privacy}","received_events_url":"https://api.github.com/users/alexlyp/received_events","type":"User","site_admin":false},"html_url":"https://github.com/alexlyp/politeia","description":null,"fork":true,"url":"https://api.github.com/repos/alexlyp/politeia","forks_url":"https://api.github.com/repos/alexlyp/politeia/forks","keys_url":"https://api.github.com/repos/alexlyp/politeia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexlyp/politeia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexlyp/politeia/teams","hooks_url":"https://api.github.com/repos/alexlyp/politeia/hooks","issue_events_url":"https://api.github.com/repos/alexlyp/politeia/issues/events{/number}","events_url":"https://api.github.com/repos/alexlyp/politeia/events","assignees_url":"https://api.github.com/repos/alexlyp/politeia/assignees{/user}","branches_url":"https://api.github.com/repos/alexlyp/politeia/branches{/branch}","tags_url":"https://api.github.com/repos/alexlyp/politeia/tags","blobs_url":"https://api.github.com/repos/alexlyp/politeia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexlyp/politeia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexlyp/politeia/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexlyp/politeia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexlyp/politeia/statuses/{sha}","languages_url":"https://api.github.com/repos/alexlyp/politeia/languages","stargazers_url":"https://api.github.com/repos/alexlyp/politeia/stargazers","contributors_url":"https://api.github.com/repos/alexlyp/politeia/contributors","subscribers_url":"https://api.github.com/repos/alexlyp/politeia/subscribers","subscription_url":"https://api.github.com/repos/alexlyp/politeia/subscription","commits_url":"https://api.github.com/repos/alexlyp/politeia/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexlyp/politeia/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexlyp/politeia/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexlyp/politeia/issues/comments{/number}","contents_url":"https://api.github.com/repos/alexlyp/politeia/contents/{+path}","compare_url":"https://api.github.com/repos/alexlyp/politeia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexlyp/politeia/merges","archive_url":"https://api.github.com/repos/alexlyp/politeia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexlyp/politeia/downloads","issues_url":"https://api.github.com/repos/alexlyp/politeia/issues{/number}","pulls_url":"https://api.github.com/repos/alexlyp/politeia/pulls{/number}","milestones_url":"https://api.github.com/repos/alexlyp/politeia/milestones{/number}","notifications_url":"https://api.github.com/repos/alexlyp/politeia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexlyp/politeia/labels{/name}","releases_url":"https://api.github.com/repos/alexlyp/politeia/releases{/id}","deployments_url":"https://api.github.com/repos/alexlyp/politeia/deployments","created_at":"2019-02-25T19:43:21Z","updated_at":"2019-02-25T19:43:24Z","pushed_at":"2019-09-03T20:10:50Z","git_url":"git://github.com/alexlyp/politeia.git","ssh_url":"git@github.com:alexlyp/politeia.git","clone_url":"https://github.com/alexlyp/politeia.git","svn_url":"https://github.com/alexlyp/politeia","homepage":null,"size":3331,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"isc","name":"ISC License","spdx_id":"ISC","url":"https://api.github.com/licenses/isc","node_id":"MDc6TGljZW5zZTEw"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"decred:master","ref":"master","sha":"c0e1f2bd1d5f93ce91157f4b73462e65d03453af","user":{"login":"decred","id":16297194,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2Mjk3MTk0","avatar_url":"https://avatars3.githubusercontent.com/u/16297194?v=4","gravatar_id":"","url":"https://api.github.com/users/decred","html_url":"https://github.com/decred","followers_url":"https://api.github.com/users/decred/followers","following_url":"https://api.github.com/users/decred/following{/other_user}","gists_url":"https://api.github.com/users/decred/gists{/gist_id}","starred_url":"https://api.github.com/users/decred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/decred/subscriptions","organizations_url":"https://api.github.com/users/decred/orgs","repos_url":"https://api.github.com/users/decred/repos","events_url":"https://api.github.com/users/decred/events{/privacy}","received_events_url":"https://api.github.com/users/decred/received_events","type":"Organization","site_admin":false},"repo":{"id":101333624,"node_id":"MDEwOlJlcG9zaXRvcnkxMDEzMzM2MjQ=","name":"politeia","full_name":"decred/politeia","private":false,"owner":{"login":"decred","id":16297194,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2Mjk3MTk0","avatar_url":"https://avatars3.githubusercontent.com/u/16297194?v=4","gravatar_id":"","url":"https://api.github.com/users/decred","html_url":"https://github.com/decred","followers_url":"https://api.github.com/users/decred/followers","following_url":"https://api.github.com/users/decred/following{/other_user}","gists_url":"https://api.github.com/users/decred/gists{/gist_id}","starred_url":"https://api.github.com/users/decred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/decred/subscriptions","organizations_url":"https://api.github.com/users/decred/orgs","repos_url":"https://api.github.com/users/decred/repos","events_url":"https://api.github.com/users/decred/events{/privacy}","received_events_url":"https://api.github.com/users/decred/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/decred/politeia","description":null,"fork":false,"url":"https://api.github.com/repos/decred/politeia","forks_url":"https://api.github.com/repos/decred/politeia/forks","keys_url":"https://api.github.com/repos/decred/politeia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/decred/politeia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/decred/politeia/teams","hooks_url":"https://api.github.com/repos/decred/politeia/hooks","issue_events_url":"https://api.github.com/repos/decred/politeia/issues/events{/number}","events_url":"https://api.github.com/repos/decred/politeia/events","assignees_url":"https://api.github.com/repos/decred/politeia/assignees{/user}","branches_url":"https://api.github.com/repos/decred/politeia/branches{/branch}","tags_url":"https://api.github.com/repos/decred/politeia/tags","blobs_url":"https://api.github.com/repos/decred/politeia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/decred/politeia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/decred/politeia/git/refs{/sha}","trees_url":"https://api.github.com/repos/decred/politeia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/decred/politeia/statuses/{sha}","languages_url":"https://api.github.com/repos/decred/politeia/languages","stargazers_url":"https://api.github.com/repos/decred/politeia/stargazers","contributors_url":"https://api.github.com/repos/decred/politeia/contributors","subscribers_url":"https://api.github.com/repos/decred/politeia/subscribers","subscription_url":"https://api.github.com/repos/decred/politeia/subscription","commits_url":"https://api.github.com/repos/decred/politeia/commits{/sha}","git_commits_url":"https://api.github.com/repos/decred/politeia/git/commits{/sha}","comments_url":"https://api.github.com/repos/decred/politeia/comments{/number}","issue_comment_url":"https://api.github.com/repos/decred/politeia/issues/comments{/number}","contents_url":"https://api.github.com/repos/decred/politeia/contents/{+path}","compare_url":"https://api.github.com/repos/decred/politeia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/decred/politeia/merges","archive_url":"https://api.github.com/repos/decred/politeia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/decred/politeia/downloads","issues_url":"https://api.github.com/repos/decred/politeia/issues{/number}","pulls_url":"https://api.github.com/repos/decred/politeia/pulls{/number}","milestones_url":"https://api.github.com/repos/decred/politeia/milestones{/number}","notifications_url":"https://api.github.com/repos/decred/politeia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/decred/politeia/labels{/name}","releases_url":"https://api.github.com/repos/decred/politeia/releases{/id}","deployments_url":"https://api.github.com/repos/decred/politeia/deployments","created_at":"2017-08-24T20:07:43Z","updated_at":"2019-09-03T18:38:37Z","pushed_at":"2019-09-03T20:10:51Z","git_url":"git://github.com/decred/politeia.git","ssh_url":"git@github.com:decred/politeia.git","clone_url":"https://github.com/decred/politeia.git","svn_url":"https://github.com/decred/politeia","homepage":null,"size":3118,"stargazers_count":87,"watchers_count":87,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":59,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":57,"license":{"key":"isc","name":"ISC License","spdx_id":"ISC","url":"https://api.github.com/licenses/isc","node_id":"MDc6TGljZW5zZTEw"},"forks":59,"open_issues":57,"watchers":87,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/decred/politeia/pulls/981"},"html":{"href":"https://github.com/decred/politeia/pull/981"},"issue":{"href":"https://api.github.com/repos/decred/politeia/issues/981"},"comments":{"href":"https://api.github.com/repos/decred/politeia/issues/981/comments"},"review_comments":{"href":"https://api.github.com/repos/decred/politeia/pulls/981/comments"},"review_comment":{"href":"https://api.github.com/repos/decred/politeia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/decred/politeia/pulls/981/commits"},"statuses":{"href":"https://api.github.com/repos/decred/politeia/statuses/fb8c1fc4c3e74667e35174ff0fdae4383014dcdb"}},"author_association":"MEMBER"}}
other: {"actor":{"display_login":"lukebp"}}