-
Notifications
You must be signed in to change notification settings - Fork 255
feat(backup)_: add api to backup and import local backup #6695
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
feat(backup)_: add api to backup and import local backup #6695
Conversation
Jenkins BuildsClick to see older builds (18)
|
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (33.33%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## feat/local-backup-remaining-settings #6695 +/- ##
========================================================================
+ Coverage 60.22% 60.27% +0.04%
========================================================================
Files 831 831
Lines 103667 103670 +3
========================================================================
+ Hits 62433 62484 +51
+ Misses 33671 33594 -77
- Partials 7563 7592 +29
Flags with carried forward coverage won't be shown. Click here to find out more.
|
315cfe0
to
76af0e3
Compare
2a581c9
to
0b81abe
Compare
@@ -579,6 +579,7 @@ func (m *Messenger) handleSyncChats(messageState *ReceivedMessageState, chats [] | |||
if err != nil { | |||
return err | |||
} | |||
messageState.AllChats.Store(chat.ID, chat) |
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.
Is this some bug you faced? 🤔
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.
Ah yes, I forgot to comment on it. It seems we have a bug where we save the chat to the DB and the messenger state, but not in the messageState.AllChats
. So there was a mismatch between that and the Response
. This made saveDataAndPrepareResponse
not return the new chat correctly. I had to restart the app to make it show.
protocol/messenger_local_backup.go
Outdated
defer func() { | ||
m.processBackedupMessages = false | ||
}() | ||
|
||
m.processBackedupMessages = true |
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.
ough, this doesn't look good. I guess it is tricky, but any chance we can avoid this?
Ideally, there should be some level of HandleBackup
that doesn't check processBackedupMessages
flag. And the level above which does.
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.
Ah, I can just call handleBackup
instead of HandleBackup
Also, once I do the clean up for the Waku stiff, I'll remove all the backup protobuf handling and we can get rid of processBackedupMessages
76af0e3
to
2941baa
Compare
0b81abe
to
7cb5c4d
Compare
2941baa
to
4505816
Compare
7cb5c4d
to
7d7d648
Compare
Replaced by #6722 |
Fixes status-im/status-desktop#18122