Skip to content

Conversation

@TarekkMA
Copy link
Contributor

No description provided.

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.

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