-
Notifications
You must be signed in to change notification settings - Fork 290
feat: MSC 4278 implementation #5014
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
Conversation
// TODO: I think I should reset all the storage and perform a new local sync | ||
// here but I don't know how |
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.
Not really sure what to do here
// TODO: I think I should reset all the storage and perform a new local sync | ||
// here but I don't know how |
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.
Not really sure what to do here
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.
I was actually looking at this recently and was surprised to see the store not getting updated when we set some account data. @poljar is there a way to tell the store that a piece of account data has been changed?
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.
Well the assumption is that a sync is running. Or maybe I'm misunderstanding what a local sync would be?
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.
I just looked at the the ignore_user
and unignore_user
function which has the exact same comment. So I assume this is a known issue maybe? I imagine that since the sync might take some time this means that if we change the value and immediately check the account data again, it won't be updated right?
And if so how long may it take to be update, are we talking about seconds or milliseconds?
Since this may affect how we design the UI.
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.
As long as a sync takes, you can subscribe to listen to account data events. There's actually a PR in flight to add exactly this to the bindings: #4994.
I suppose you'll have to subscribe to this anyways, in case the value gets updated on another device.
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.
nice this would be very useful!
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5014 +/- ##
==========================================
- Coverage 85.86% 85.78% -0.08%
==========================================
Files 325 325
Lines 35853 35887 +34
==========================================
+ Hits 30785 30787 +2
- Misses 5068 5100 +32 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ad0b822
to
9feea1c
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.
This looks great - marking as "request changes" so it pings me when we figure out the remaining questions and you re-request review.
// TODO: I think I should reset all the storage and perform a new local sync | ||
// here but I don't know how |
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.
I was actually looking at this recently and was surprised to see the store not getting updated when we set some account data. @poljar is there a way to tell the store that a piece of account data has been changed?
9feea1c
to
4f4c52e
Compare
4f4c52e
to
60a2d20
Compare
This PR updates Ruma and implements new APIs to use the unstable MSC 4278.
This new global account data setting, will be used by clients to decide what policy to follow in display the media previews in the timeline, and the avatars in invite requests