@@ -100,9 +100,7 @@ func (m *Messenger) BackupData(ctx context.Context) (uint64, error) {
100
100
return 0 , err
101
101
}
102
102
chatsToBackup := m .backupChats (ctx , clock )
103
- if err != nil {
104
- return 0 , err
105
- }
103
+
106
104
profileToBackup , err := m .backupProfile (ctx , clock )
107
105
if err != nil {
108
106
return 0 , err
@@ -210,14 +208,14 @@ func (m *Messenger) BackupData(ctx context.Context) (uint64, error) {
210
208
pb := backupDetailsOnly ()
211
209
pb .SettingsDetails .DataNumber = uint32 (i + 1 )
212
210
pb .Setting = d
213
- // TODO find a way to get all settings
214
- // fullBackup.Setting = append(fullBackup.Setting, d)
211
+ fullBackup .Settings = append (fullBackup .Settings , d )
215
212
err = m .encodeAndDispatchBackupMessage (ctx , pb , chat .ID )
216
213
if err != nil {
217
214
return 0 , err
218
215
}
219
216
}
220
217
218
+ // TODO get rid of keypairs
221
219
// Update keypairs messages encode and dispatch
222
220
for i , d := range keypairsToBackup {
223
221
pb := backupDetailsOnly ()
@@ -236,8 +234,7 @@ func (m *Messenger) BackupData(ctx context.Context) (uint64, error) {
236
234
pb := backupDetailsOnly ()
237
235
pb .WatchOnlyAccountDetails .DataNumber = uint32 (i + 1 )
238
236
pb .WatchOnlyAccount = d .WatchOnlyAccount
239
- // TODO find a way to get all settings
240
- // fullBackup.WatchOnlyAccount = append(fullBackup.WatchOnlyAccount, d.Keypair)
237
+ fullBackup .WatchOnlyAccounts = append (fullBackup .WatchOnlyAccounts , d .WatchOnlyAccount )
241
238
err = m .encodeAndDispatchBackupMessage (ctx , pb , chat .ID )
242
239
if err != nil {
243
240
return 0 , err
0 commit comments