-
Notifications
You must be signed in to change notification settings - Fork 261
feat: local backup cherrypicked to old release branch (for 2.34 mobile) #6980
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes status-im/status-desktop#18248 status-im/status-desktop#18107 status-im/status-desktop#18120 status-im/status-desktop#18122 status-im/status-desktop#18141 status-im/status-desktop#18121 Implements all the backend for the local user data backups. Uses the scaffold @osmaczko created to make it more extendable. Instead of using the old Messenger code for backups, we now use a new controller that let's other modules register to be backed up. This includes the messenger for chats, contacts and communities, the accounts service for settings and the wallet service for watch-only accounts. I also created new Protobufs for those backups, so that we no longer user the super generic Waku Backup protobuf. Finally, I added some integration tests and a functional test that does the whole flow. A lot of cleanups can still be done to reduce duplication, but they can be done in another commit/issue, since the internal of the services can be modified without the backup process being affected, since the protobufs are in place already.
* test_: add restore account * test_: add restore account tests * test_: add restore account tests * test_: add concurrent test * test_: class rename * test_: fix assert * test_: review comments * test_: fix * test_: fix review comments
Fixes status-im/status-desktop#18731 Turns out our pubkeys all start with the same prefix, and I chose exactly the length of the prefix in the previous version, so all files had the same name. Using the profile keypair solves this
This should make it work on mobile as well plus it sets a default to the setting
It is the name that users are used to see, so it will be less confusing
This is a fix for the backup and also just a performance improvement. Basically, when we have a SyncCommunity message, we leave the community if the state of said community is not pending or joined (meaning we left it). However, in the case of backup messages, we backup left communities too, but when trying to "leave" those communities, it threw an error about unknown chat, since we never spectated that community in that imported profile. The solution is just to early return when we don't have anything to leave. We gracefully ignore the error in the Sync function and pass the error when actively trying to leave (you can't leave twice). Added tests and also cleaned up some warnings.
Fixes status-im/status-desktop#18529 Implements a rough but functional proof of concept for message backup and import. It is guarded by a new setting so that you need to opt-in to have it, thus not breaking PFS by default. It works for text messages, contacts requests, images, emojis, transaction commands, pins and stickers.
We require commits to follow the Conventional Commits, but with
|
Jenkins Builds
|
Closing because there is an existing one |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
applied 15 commits related to local backup:
Commits: