diff options
author | Wim <wim@42.be> | 2022-02-04 00:33:50 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2022-03-20 14:57:48 +0100 |
commit | 1b9877fda45be021ea6a5677c78648cecc19dcd5 (patch) | |
tree | bdbf82d503229c38f415833b6daf5fc8a359b1d3 /bridge/whatsapp/whatsapp.go | |
parent | 0205a67309ab681a1b0cabe96d5b231f7df8d64e (diff) | |
download | matterbridge-msglm-1b9877fda45be021ea6a5677c78648cecc19dcd5.tar.gz matterbridge-msglm-1b9877fda45be021ea6a5677c78648cecc19dcd5.tar.bz2 matterbridge-msglm-1b9877fda45be021ea6a5677c78648cecc19dcd5.zip |
Fetch avatars synchronous (whatsapp)
Diffstat (limited to 'bridge/whatsapp/whatsapp.go')
-rw-r--r-- | bridge/whatsapp/whatsapp.go | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/bridge/whatsapp/whatsapp.go b/bridge/whatsapp/whatsapp.go index f4d73534..c28b3c89 100644 --- a/bridge/whatsapp/whatsapp.go +++ b/bridge/whatsapp/whatsapp.go @@ -113,22 +113,22 @@ func (b *Bwhatsapp) Connect() error { } // get user avatar asynchronously - go func() { - b.Log.Debug("Getting user avatars..") - - for jid := range b.users { - info, err := b.GetProfilePicThumb(jid) - if err != nil { - b.Log.Warnf("Could not get profile photo of %s: %v", jid, err) - } else { - b.Lock() - b.userAvatars[jid] = info.URL - b.Unlock() - } + // go func() { + b.Log.Info("Getting user avatars..") + + for jid := range b.users { + info, err := b.GetProfilePicThumb(jid) + if err != nil { + b.Log.Warnf("Could not get profile photo of %s: %v", jid, err) + } else { + b.Lock() + b.userAvatars[jid] = info.URL + b.Unlock() } + } - b.Log.Debug("Finished getting avatars..") - }() + b.Log.Info("Finished getting avatars..") + // }() return nil } |