From 904bade7a861dc562ad7ab53adf55ecd47f85d51 Mon Sep 17 00:00:00 2001 From: Adhiraj Date: Sat, 29 Aug 2020 14:48:55 +0530 Subject: [PATCH] duplicate key bug fix --- src/WAConnection/4.Events.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/WAConnection/4.Events.ts b/src/WAConnection/4.Events.ts index e46b1076..046905ff 100644 --- a/src/WAConnection/4.Events.ts +++ b/src/WAConnection/4.Events.ts @@ -182,8 +182,9 @@ export class WAConnection extends Base { spam: 'false', name } - await this.setProfilePicture (chat) this.chats.insert (chat) + + await this.setProfilePicture (chat) this.emit ('chat-new', chat) return chat }