-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat: Add custom reactions to ReactionKind for posts #209
base: main
Are you sure you want to change the base?
Conversation
@@ -33,6 +33,7 @@ pub type ReactionId = u64; | |||
pub enum ReactionKind { | |||
Upvote, | |||
Downvote, | |||
Custom(u32), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe call it Emoji
?
But I am not sure, need to discuss it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember one idea was to support custom reactions (not even emojis).
For example, you could use custom reactions to implement on-chain voting, and having 4 bytes can give you a lot of variations for different options in a poll.
@@ -78,6 +78,7 @@ benchmarks! { | |||
let other_kind = match reaction.kind { | |||
ReactionKind::Upvote => ReactionKind::Downvote, | |||
ReactionKind::Downvote => ReactionKind::Upvote, | |||
_ => ReactionKind::Upvote, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure about this. What if this is a negative emoji? Then it cannot be considered as an upvote.
No description provided.