feat: send presence update when name changed

This commit is contained in:
Adhiraj Singh
2022-04-08 23:29:48 +05:30
parent 060c838707
commit f1b64c3c35
2 changed files with 8 additions and 2 deletions

View File

@@ -583,8 +583,10 @@ export const processSyncActions = (
name: action.contactAction!.fullName
}
} else if(action?.pushNameSetting) {
map['creds.update'] = map['creds.update'] || { }
map['creds.update'].me = { ...me, name: action?.pushNameSetting?.name! }
if(me?.name !== action?.pushNameSetting) {
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) {