mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2025-01-19 02:41:57 +01:00
Merge pull request #525 from mautrix/make-contact-agumentation-more-efficient
provisioning/list_contacts: make augmentation with avatar more efficient
This commit is contained in:
commit
7247e9b2e6
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{}{}
|
augmentedContacts := map[types.JID]interface{}{}
|
||||||
for jid, contact := range contacts {
|
for jid, contact := range contacts {
|
||||||
var avatarUrl id.ContentURI
|
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
|
avatarUrl = puppet.AvatarURL
|
||||||
}
|
}
|
||||||
augmentedContacts[jid] = map[string]interface{}{
|
augmentedContacts[jid] = map[string]interface{}{
|
||||||
|
|
Loading…
Add table
Reference in a new issue