Set name in SyncContactIfNecessary even if contact info not found

This commit is contained in:
Tulir Asokan 2021-03-22 20:49:17 +02:00
parent 9f64b357e0
commit 7af5b46414

View file

@ -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)
}