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

feat: Add custom reactions to ReactionKind for posts #209

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TarekkMA
Copy link
Contributor

No description provided.

@@ -33,6 +33,7 @@ pub type ReactionId = u64;
pub enum ReactionKind {
Upvote,
Downvote,
Custom(u32),
Copy link
Member

@siman siman May 31, 2023

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.

Copy link
Member

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,
Copy link
Member

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.

@F3Joule F3Joule marked this pull request as draft December 6, 2023 20:59
@F3Joule F3Joule added enhancement New feature or request question Further information is requested labels Dec 6, 2023
@F3Joule F3Joule removed the request for review from olehmell January 5, 2024 14:18
@F3Joule F3Joule changed the title Custom Reaction feat: Add custom reactions to ReactionKind for posts Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants