Skip to content

Commit b79db60

Browse files
committed
Fix: The initial presence will send after getting roster
1 parent 5e9084e commit b79db60

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/modules/chat/qbChat.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -731,11 +731,7 @@ ChatProxy.prototype = {
731731

732732
// enable carbons
733733
self._enableCarbons();
734-
735-
// chat server will close your connection if you are not active in chat during one minute
736-
// initial presence and an automatic reminder of it each 55 seconds
737-
self.connection.send($pres());
738-
734+
739735
if (typeof callback === 'function') {
740736
if (params.connectWithoutGettingRoster) {
741737
// connected and return nothing as result
@@ -759,13 +755,16 @@ ChatProxy.prototype = {
759755
for (var i = 0, len = rooms.length; i < len; i++) {
760756
self.muc.join(rooms[i]);
761757
}
762-
758+
763759
// fire 'onReconnectListener'
764-
if (typeof self.onReconnectListener === 'function'){
760+
if (typeof self.onReconnectListener === 'function') {
765761
Utils.safeCallbackCall(self.onReconnectListener);
766762
}
767763
}
768764

765+
// chat server will close your connection if you are not active in chat during one minute
766+
// initial presence and an automatic reminder of it each 55 seconds
767+
self.connection.send($pres());
769768
break;
770769
case Strophe.Status.DISCONNECTING:
771770
Utils.QBLog('[Chat]', 'Status.DISCONNECTING');

0 commit comments

Comments
 (0)