|
@@ -495,7 +495,7 @@ ChatRoom.prototype.onPresenceUnavailable = function (pres, from) {
|
495
|
495
|
}
|
496
|
496
|
if ($(pres).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>status[code="307"]').length) {
|
497
|
497
|
if (this.myroomjid === from) {
|
498
|
|
- this.leave();
|
|
498
|
+ this.leave(true);
|
499
|
499
|
this.eventEmitter.emit(XMPPEvents.KICKED);
|
500
|
500
|
}
|
501
|
501
|
}
|
|
@@ -943,13 +943,15 @@ ChatRoom.prototype.onMute = function (iq) {
|
943
|
943
|
|
944
|
944
|
/**
|
945
|
945
|
* Leaves the room. Closes the jingle session.
|
|
946
|
+ * @parama voidSendingPresence avoids sending the presence when leaving
|
946
|
947
|
*/
|
947
|
|
-ChatRoom.prototype.leave = function () {
|
|
948
|
+ChatRoom.prototype.leave = function (avoidSendingPresence) {
|
948
|
949
|
if (this.session) {
|
949
|
950
|
this.session.close();
|
950
|
951
|
}
|
951
|
952
|
this.eventEmitter.emit(XMPPEvents.DISPOSE_CONFERENCE);
|
952
|
|
- this.doLeave();
|
|
953
|
+ if(!avoidSendingPresence)
|
|
954
|
+ this.doLeave();
|
953
|
955
|
this.connection.emuc.doLeave(this.roomjid);
|
954
|
956
|
};
|
955
|
957
|
|