Re-set contact info if phone or contact ID changes
This commit is contained in:
parent
765dc618e6
commit
27d7edcb6d
1 changed files with 2 additions and 0 deletions
|
@ -313,10 +313,12 @@ func (puppet *Puppet) Sync(ctx context.Context, source *User, contact *gmproto.P
|
||||||
update := false
|
update := false
|
||||||
if contact.ID.Number != "" && puppet.Phone != contact.ID.Number {
|
if contact.ID.Number != "" && puppet.Phone != contact.ID.Number {
|
||||||
puppet.Phone = contact.ID.Number
|
puppet.Phone = contact.ID.Number
|
||||||
|
puppet.ContactInfoSet = false
|
||||||
update = true
|
update = true
|
||||||
}
|
}
|
||||||
if contact.ContactID != puppet.ContactID {
|
if contact.ContactID != puppet.ContactID {
|
||||||
puppet.ContactID = contact.ContactID
|
puppet.ContactID = contact.ContactID
|
||||||
|
puppet.ContactInfoSet = false
|
||||||
update = true
|
update = true
|
||||||
}
|
}
|
||||||
update = puppet.UpdateName(ctx, contact.GetFormattedNumber(), contact.GetFullName(), contact.GetFirstName()) || update
|
update = puppet.UpdateName(ctx, contact.GetFormattedNumber(), contact.GetFullName(), contact.GetFirstName()) || update
|
||||||
|
|
Loading…
Reference in a new issue