diff --git a/samples/chat/README.md b/samples/chat/README.md index 0ea8cc32c..2f894d96d 100644 --- a/samples/chat/README.md +++ b/samples/chat/README.md @@ -23,4 +23,4 @@ It allows: # Documentation -Original sample description & setup guide - [JS Chat Sample](https://quickblox.com/developers/Web_XMPP_Chat_Sample#Guide:_Getting_Started_with_Chat_API) \ No newline at end of file +Original sample description & setup guide - [JS Chat Sample](https://quickblox.com/developers/Web_XMPP_Chat_Sample#Guide:_Getting_Started_with_Chat_API) diff --git a/samples/chat/js/dialog.js b/samples/chat/js/dialog.js index 2d784a851..7c9cde55e 100644 --- a/samples/chat/js/dialog.js +++ b/samples/chat/js/dialog.js @@ -368,6 +368,9 @@ Dialog.prototype.createDialog = function (params) { } (new Promise(function (resolve){ + if(createdDialog.type===CONSTANTS.DIALOG_TYPES.CHAT){ + resolve(); + } self.joinToDialog(id).then(function(){ if(createdDialog.type === CONSTANTS.DIALOG_TYPES.GROUPCHAT){ messageModule.sendMessage(id, notificationMessage);