Explicit waitForConnection + option to not load profile picture for new chats

This commit is contained in:
Adhiraj Singh
2020-10-19 15:22:44 +05:30
parent bb78138506
commit 588209d57c
4 changed files with 10 additions and 3 deletions

View File

@@ -199,8 +199,9 @@ export class WAConnection extends Base {
name
}
this.chats.insert (chat)
await this.setProfilePicture (chat)
if (this.loadProfilePicturesForChatsAutomatically) {
await this.setProfilePicture (chat)
}
this.emit ('chat-new', chat)
return chat