feat: handle unarchiveChats setting

This commit is contained in:
Adhiraj Singh
2022-04-07 11:29:57 +05:30
parent ebf4aa6772
commit 0d94315776
5 changed files with 28 additions and 11 deletions

View File

@@ -583,11 +583,13 @@ export const processSyncActions = (
name: action.contactAction!.fullName
}
} else if(action?.pushNameSetting) {
map['creds.update'] = {
me: { ...me, name: action?.pushNameSetting?.name! }
}
map['creds.update'] = map['creds.update'] || { }
map['creds.update'].me = { ...me, name: action?.pushNameSetting?.name! }
} else if(action?.pinAction) {
update.pin = action.pinAction?.pinned ? toNumber(action.timestamp) : undefined
} else if(action?.unarchiveChatsSetting) {
map['creds.update'] = map['creds.update'] || { }
map['creds.update'].accountSettings = { unarchiveChats: !!action.unarchiveChatsSetting.unarchiveChats }
} else {
logger.warn({ action, id }, 'unprocessable update')
}