Message reactions draft - 3 refTypes #473
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
Description
There are still things missing, this is a work in progress.
This PR replaces the earlier reactions prototype #445 (now closed). The previous prototype was using a single refType with a more complex reaction payload to determine the behaviour of each reaction.
The current approach uses three different refTypes, one for each desired behaviour:
This has the advantage of having separate summary counts for each refType, and also knowing that everyone who participates with reactions in a given refType is subject to the same rules.
Previously (and what many alternative Chat SDKs do) the client was choosing how to react. The application could offer a default (eg via UI) but someone using the dev console (or another client implementation) could add reactions in any mode they liked and have them counted up incorrectly / unfairly to everyone else. Now if someone attempts to use a different refType (eg to react many times in a one-reaction-per-message setting), their reactions might work in the separate refType but nobody else will see them since they'll be watching another refType altogether. Capabilities might help restrict this further in the future.
Checklist
Testing Instructions (Optional)