Fetch details of user when adding a contact (#3271)

This commit is contained in:
Alexander 2023-03-14 10:00:05 +01:00 committed by GitHub
parent cbb016ac00
commit 7123b22c52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 0 deletions

View File

@ -1033,5 +1033,20 @@ func (m *Messenger) BuildContact(contactID string) (*Contact, error) {
return nil, err
}
}
// Schedule sync filter to fetch information about the contact
publicKey, err := contact.PublicKey()
if err != nil {
return nil, err
}
filter, err := m.transport.JoinPrivate(publicKey)
if err != nil {
return nil, err
}
_, err = m.scheduleSyncFilters([]*transport.Filter{filter})
if err != nil {
return nil, err
}
return contact, nil
}