Here I've found that there's an ability to add a callback as the 3rd argument to a leave
method: https://github.com/metajack/strophejs-plugins/blob/96da306f5394b901e190a3f7365fbbb676fddb51/muc/strophe.muc.js#L117
But it doesn't work. How to add a callback or something else to a instance.connection.muc.leave() method to make sure that a chat-room was left successfully? Maybe there are some more ways to make sure that we have left a chat-room?
function handler_cb() {
console.log('>>>>>>>>> leave was successfull');
}
function leaveChat() {
instance.connection.muc.leave(room, nick, handler_cb);
}