-
Notifications
You must be signed in to change notification settings - Fork 260
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
timeline: refactor reaction handling #3761
Conversation
…meta's reaction fields to the Reactions object No changes in functionality, pure code motion.
It's exactly the same as `Reaction::senders`'s length.
… or remote id This makes it impossible to represent states like "there's a local *and* a remote echo for the same sender for a given reaction", or multiple reactions from the same sender to the same event, and so on.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3761 +/- ##
==========================================
- Coverage 84.08% 84.08% -0.01%
==========================================
Files 260 259 -1
Lines 27031 26993 -38
==========================================
- Hits 22730 22697 -33
+ Misses 4301 4296 -5 ☔ View full report in Codecov by Sentry. |
8a8a581
to
d234324
Compare
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.
Code looks great to me (as much as i can tell) and it also works great, tested it on EX iOS.
Lovely cleanup! 👌
This moves fields around, renames stuff, and changes the way we store reactions:
Reactions::map
and storing reactions inEventTimelineItem
as two sources of truth, reactions are only stored inEventTimelineItem
now. There's still the need to map from a reaction txn-id | event-id to the thing it's reacting to (e.g. when redacting a reaction), somap
has been adapted for that usage.Reactions::map
.annotation key
then bysender id
, instead ofannotation key
thentxn id | event id
. This has the benefit of making it impossible to have two reactions from the same sender. I'm wondering if that could cause issue with local vs remote reactions from the current user, so will ask for further testing.This should be reviewable commit by commit.