-
Notifications
You must be signed in to change notification settings - Fork 250
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
fix_: persist left communities even for restored account #5174
Conversation
Jenkins BuildsClick to see older builds (29)
|
361bb04
to
0053415
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.
I had some questions
c8b6b58
to
038a6b3
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.
A few questions
038a6b3
to
a58f720
Compare
This PR fixes #7858 by making sure left persisted communities are restored during the backup restore flow
a58f720
to
ff1a93c
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.
Sorry for being late into the party 😞
Since newly introduced LeftCommunities
seems to be a subset of DeletedCommunities
I am not sure how this fixes the issue 🤔 Am I missing something here?
Left []*communities.Community | ||
Deleted []*communities.Community |
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 don't think there is a semantic difference between Left
and Deleted
communities. I found the originating PR: #2639 and the issue: status-im/status-mobile#13198, which states: "Communities you left are not backed up/synced".
Newly introduced LeftCommunities
seems to be a subset of DeletedCommunities
:
LEFT:
query := communitiesBaseQuery + ` WHERE NOT c.Joined AND NOT c.spectated AND r.state != ?`
DELETED:
query := communitiesBaseQuery + ` WHERE NOT c.Joined AND (r.community_id IS NULL or r.state != ?)`
Hi @osmaczko, You are right, the |
I understand the |
Wait @osmaczko, after second thought, actually that's surprising, I did the test without current pr changes again and it fails, so somehow, these changes are needed Screencast.from.2024-05-22.17-16-11.webmI will do a deeper analysis on this issue. My query should be : query := communitiesBaseQuery + ` WHERE NOT c.Joined AND NOT c.spectated` Because having the state to be anything but Pending join is not correct. Still investigating |
This PR fixes #7858 by making sure left persisted communities are restored during the backup restore flow
Description
This PR fixes #7858 by making sure left persisted communities are restored during the backup restore flow
Closes #7858
Screenshot
Since it's hard to make integration test that can simulate the delete of the data folder, I'll make a video to show that it works in principle.
Screencast.from.2024-05-16.13-51-32.webm