mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-09 23:40:27 +00:00
Fetch avatars synchronous (whatsapp)
This commit is contained in:
parent
0205a67309
commit
1b9877fda4
@ -28,6 +28,8 @@ func (b *Bwhatsapp) handleMessage(message *events.Message) {
|
||||
return
|
||||
}
|
||||
|
||||
b.Log.Infof("Receiving message %#v", msg)
|
||||
|
||||
switch {
|
||||
case msg.Conversation != nil || msg.ExtendedTextMessage != nil:
|
||||
b.handleTextMessage(message.Info, msg)
|
||||
|
@ -113,8 +113,8 @@ func (b *Bwhatsapp) Connect() error {
|
||||
}
|
||||
|
||||
// get user avatar asynchronously
|
||||
go func() {
|
||||
b.Log.Debug("Getting user avatars..")
|
||||
// go func() {
|
||||
b.Log.Info("Getting user avatars..")
|
||||
|
||||
for jid := range b.users {
|
||||
info, err := b.GetProfilePicThumb(jid)
|
||||
@ -127,8 +127,8 @@ func (b *Bwhatsapp) Connect() error {
|
||||
}
|
||||
}
|
||||
|
||||
b.Log.Debug("Finished getting avatars..")
|
||||
}()
|
||||
b.Log.Info("Finished getting avatars..")
|
||||
// }()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user