Skip to content

Conversation

@mrbianchi
Copy link
Contributor

Allow neutral vote (0)

@mattyg
Copy link
Owner

mattyg commented Jun 5, 2023

Thanks for the PR!

Is the user-facing idea of this feature to remove a vote that you have already cast? So for example, if I upvote a post, then decide I want to remove that upvote, I can instead cast a 0 vote to supersede my upvote? Makes sense to me!

@mrbianchi
Copy link
Contributor Author

Thanks for the PR!

Is the user-facing idea of this feature to remove a vote that you have already cast? So for example, if I upvote a post, then decide I want to remove that upvote, I can instead cast a 0 vote to supersede my upvote? Makes sense to me!

That would be my intention. Perhaps deleting the action would have been more assertive instead of issuing another one with a value of 0?

@mattyg
Copy link
Owner

mattyg commented Jun 21, 2023

Thanks for the PR!
Is the user-facing idea of this feature to remove a vote that you have already cast? So for example, if I upvote a post, then decide I want to remove that upvote, I can instead cast a 0 vote to supersede my upvote? Makes sense to me!

That would be my intention. Perhaps deleting the action would have been more assertive instead of issuing another one with a value of 0?

yeah I agree I think deleting the previous vote makes more sense.

None,
)?.iter().for_each(|link| {
if link.target.clone().to_hex() == comment_hash.to_hex() {
let _ = delete_link(link.create_link_hash.clone());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is giving me the following error:
{type: "error", data: {type: "internal_error", data: "Source chain error: InvalidCommit error: There are no link types in this integrity zome"}}

Copy link
Owner

Choose a reason for hiding this comment

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

amazing thanks for raising this. I think you caught a bug in holochain core. I created a minimal example and raised in with the core team: holochain/holochain#2541

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.

2 participants