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: reaction metadata #123

Open
varunsrin opened this issue Sep 26, 2022 · 4 comments
Open

feat: reaction metadata #123

varunsrin opened this issue Sep 26, 2022 · 4 comments
Assignees
Labels
t-feat Add a new feature or protocol improvement
Milestone

Comments

@varunsrin
Copy link
Member

What is the feature you would like to implement?
Add a special metadata field to reactions that allow them to be interpreted in a different way (e.g. interpret as GM instead of Heart)

Why is this feature important?
Allows developers to build many new cast interactions on top of the existing action system by adding a minimal amount of metadata.

Will the protocol spec need to be updated??
Will require changes to Actions in Section 4

How should this feature be built? (optional)
TBD

Additional context
There is some overlap with #119 since polls could be composed as a form of metadata on top of a reaction, so consider how these might be implemented together.

@varunsrin varunsrin added this to the v2.0.0 milestone Sep 26, 2022
@pfletcherhill
Copy link
Contributor

How would this relate to the type field already on a ReactionAdd message? Currently the type is only like.

@varunsrin varunsrin added t-feat Add a new feature or protocol improvement protocol labels Sep 28, 2022
@pfletcherhill
Copy link
Contributor

Proposal

Update the ReactionAdd message to include two (character limited) strings:

type ReactionBody = {
  cast: CastURL;
  type: string; // limit to 12 characters (chosen arbitrarily)
  meta: string; // limit to 25 characters (same as poll options eventually)
}

To save space, we could also limit the type to be a number like MessageType.

@varunsrin
Copy link
Member Author

suggestions:

  1. For type, since it is strictly typed, can we just use an enum instead of a string? If we only have 4 values, that will save a large amount of space, especially given that reactions are the most common action by volume,

  2. For meta, i think we should keep it fairly small, maybe 4 bytes or so? People can use the delegate app identifiers in combination with the meta to determine how it should be interpreted.

@varunsrin
Copy link
Member Author

moving to v2.1.0 per our discussion

@varunsrin varunsrin modified the milestones: v2.0.0 p2, v2.1.0 Oct 12, 2022
@varunsrin varunsrin linked a pull request Nov 1, 2022 that will close this issue
3 tasks
@varunsrin varunsrin removed a link to a pull request Nov 1, 2022
3 tasks
@varunsrin varunsrin modified the milestones: v2.1.0, vNext Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-feat Add a new feature or protocol improvement
Projects
None yet
Development

No branches or pull requests

2 participants