mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-12-13 17:13:11 +01:00
provisioning/list_contacts: make augmentation with avatar more efficient
Signed-off-by: Sumner Evans <sumner@beeper.com>
This commit is contained in:
parent
1e8fb6459d
commit
07a43e6541
1 changed files with 1 additions and 1 deletions
|
@ -294,7 +294,7 @@ func (prov *ProvisioningAPI) ListContacts(w http.ResponseWriter, r *http.Request
|
|||
augmentedContacts := map[types.JID]interface{}{}
|
||||
for jid, contact := range contacts {
|
||||
var avatarUrl id.ContentURI
|
||||
if puppet := prov.bridge.DB.Puppet.Get(jid); puppet != nil {
|
||||
if puppet := prov.bridge.GetPuppetByJID(jid); puppet != nil {
|
||||
avatarUrl = puppet.AvatarURL
|
||||
}
|
||||
augmentedContacts[jid] = map[string]interface{}{
|
||||
|
|
Loading…
Reference in a new issue