forked from MirrorHub/mautrix-whatsapp
Set name in SyncContactIfNecessary even if contact info not found
This commit is contained in:
parent
9f64b357e0
commit
7af5b46414
1 changed files with 5 additions and 3 deletions
|
@ -295,10 +295,12 @@ func (puppet *Puppet) SyncContactIfNecessary(source *User) {
|
|||
|
||||
contact, ok := source.Conn.Store.Contacts[puppet.JID]
|
||||
if !ok {
|
||||
return
|
||||
puppet.log.Warnln("No contact info found through %s in SyncContactIfNecessary", source.MXID)
|
||||
contact.JID = puppet.JID
|
||||
// Sync anyway to set a phone number name
|
||||
} else {
|
||||
puppet.log.Debugfln("Syncing contact info through %s / %s because puppet has no displayname", source.MXID, source.JID)
|
||||
}
|
||||
|
||||
puppet.log.Debugfln("Syncing contact info through %s / %s because puppet has no displayname", source.MXID, source.JID)
|
||||
puppet.Sync(source, contact)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue