Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cms] Add Support, Oppose and Comment DCC functionality #981

Merged
merged 11 commits into from Sep 5, 2019

Conversation

alexlyp
Copy link
Member

@alexlyp alexlyp commented Aug 20, 2019

Requires #980

This PR adds the ability for users to offer their support, opposition
and comment on active DCC proposals (issuances or revocations).

When an authorized user submits a Support or Opposition request,
metadata from the request is appended to the existing DCC on
the politeiad backend. This makes them permanent and verifiable.

@lukebp
Copy link
Member

lukebp commented Aug 20, 2019

Why are separate routes needed for support and oppose? If they're normal comments, would it be simpler to just use the comment route and then have politeiawww check if they parse to "aye" or "nay"?

@alexlyp
Copy link
Member Author

alexlyp commented Aug 21, 2019

Yah I had thought of that. Mostly I wanted these comments to be set apart and not a reply to another comment or anything (parent 0). And plus I was worried about the possibility of someone commenting multiple times with aye or nay. In its current form, comments don't allow aye or nay.

Definitely possible to go in that direction if you'd like. Just would need to update validation a bit.

@lukebp
Copy link
Member

lukebp commented Aug 22, 2019

Mostly I wanted these comments to be set apart and not a reply to another comment or anything (parent 0).

You could make specific "aye" and "nay" buttons in the gui that format the comment correctly and send it.

@marcopeereboom what do you think? Multiple routes or add additional validation to the comment route?

@marcopeereboom
Copy link
Member

I think this belongs in a stream with a single route. The GUI can have multiple buttons to send whatever to the stream journal.

@alexlyp
Copy link
Member Author

alexlyp commented Aug 22, 2019

OK will make the suggested change to use just the NewComment route

@alexlyp alexlyp changed the title [cms] Add Support, Oppose and Comment DCC requests [cms] Add Support, Oppose and Comment DCC functionality Aug 22, 2019
@lukebp
Copy link
Member

lukebp commented Aug 23, 2019

OK will make the suggested change to use just the NewComment route.

I think he meant that this data belongs in a mdstream instead of a comment. So you would have a single route that allows the user to vote "aye" or "nay" on the DCC and this data would be saved in politeiad as an mdstream. Every time someone else votes on the DCC you append the vote onto the mdstream.

I agree with this as well. In retrospect, it makes more sense to use an mdstream than to try and re-purpose a comment.

This PR adds the ability for users to offer their support, opposition
and comment on active DCC proposals (issuances or revocations).

When a user offers there support or opposition of a given DCC proposal,
metadata containing user information is appended on the existing
journal entry on the politeiad backend.  This is similar to the process
of changing the status of a proposal.  All changes are tracked and
immutable once attached to a journal entry.
politeiawww/api/cms/v1/v1.go Outdated Show resolved Hide resolved
politeiawww/dcc.go Outdated Show resolved Hide resolved
politeiawww/dcc.go Outdated Show resolved Hide resolved
politeiawww/dcc.go Outdated Show resolved Hide resolved
politeiawww/api/cms/v1/v1.go Outdated Show resolved Hide resolved
politeiawww/dcc.go Outdated Show resolved Hide resolved
politeiawww/dcc.go Outdated Show resolved Hide resolved
politeiawww/dcc.go Outdated Show resolved Hide resolved
politeiawww/api/cms/v1/api.md Show resolved Hide resolved
politeiawww/dcc.go Show resolved Hide resolved
Copy link
Member

@lukebp lukebp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested this yet. I'll test it in the morning.

politeiawww/dcc.go Outdated Show resolved Hide resolved
Copy link
Member

@lukebp lukebp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK

@alexlyp alexlyp merged commit c43abed into decred:master Sep 5, 2019
@alexlyp alexlyp deleted the ayp_dcc_2 branch September 5, 2019 17:51
vibros68 pushed a commit to vibros68/politeia that referenced this pull request Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants