Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
a3fe6162
Commit
a3fe6162
authored
Jun 05, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Proper MUC reconnection is handled in converse-muc-views
parent
ca9d53a6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
28 deletions
+15
-28
dev.html
dev.html
+2
-2
dist/converse.js
dist/converse.js
+10
-22
src/converse-chatboxes.js
src/converse-chatboxes.js
+2
-2
src/converse-muc.js
src/converse-muc.js
+1
-2
No files found.
dev.html
View file @
a3fe6162
...
...
@@ -32,8 +32,8 @@
notify_all_room_messages
:
[
'
discuss@conference.conversejs.org
'
],
bosh_service_url
:
'
http://chat.example.org:5280/http-bind/
'
,
//
bosh_service_url: 'https://conversejs.org/http-bind/', // Please use this connection manager only for testing purposes
//
bosh_service_url: 'http://chat.example.org:5280/http-bind/',
bosh_service_url
:
'
https://conversejs.org/http-bind/
'
,
// Please use this connection manager only for testing purposes
message_archiving
:
'
always
'
,
debug
:
true
});
...
...
dist/converse.js
View file @
a3fe6162
...
...
@@ -62062,13 +62062,6 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
return this.__super__.disconnect.apply(this, arguments);
},
logOut: function logOut() {
const _converse = this.__super__._converse;
_converse.chatboxviews.closeAllChatBoxes();
return this.__super__.logOut.apply(this, arguments);
},
initStatus: function initStatus(reconnecting) {
const _converse = this.__super__._converse;
...
...
@@ -62631,11 +62624,11 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
},
onConnected() {
this.browserStorage = new Backbone.BrowserStorage
[_converse.storage]
(b64_sha1(`converse.chatboxes-${_converse.bare_jid}`));
this.browserStorage = new Backbone.BrowserStorage
.session
(b64_sha1(`converse.chatboxes-${_converse.bare_jid}`));
this.registerMessageHandler();
this.fetch({
add
: true,
success
: this.onChatBoxesFetched.bind(this)
'add'
: true,
'success'
: this.onChatBoxesFetched.bind(this)
});
},
...
...
@@ -62930,11 +62923,8 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
_converse.emit('chatBoxesInitialized');
});
_converse.api.listen.on('beforeTearDown', () => {
_converse.chatboxes.remove(); // Don't call off(), events won't get re-registered upon reconnect.
delete _converse.chatboxes.browserStorage;
_converse.api.listen.on('logout', () => {
_converse.chatboxviews.closeAllChatBoxes();
});
_converse.api.listen.on('presencesInitialized', () => _converse.chatboxes.onConnected());
...
...
@@ -72212,14 +72202,14 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
const vcards = [];
if (this.get('jid')) {
vcards.push(
this.updateVCard(
_converse.vcards.findWhere({
vcards.push(_converse.vcards.findWhere({
'jid': this.get('jid')
}))
)
;
}));
}
vcards.push(
this.updateVCard(
_converse.vcards.findWhere({
vcards.push(_converse.vcards.findWhere({
'jid': this.get('from')
}))
)
;
}));
_.forEach(_.filter(vcards, undefined), vcard => {
if (hash && vcard.get('image_hash') !== hash) {
...
...
@@ -72413,7 +72403,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}
function disconnectChatRooms() {
/* When disconnecting,
or reconnecting,
mark all chat rooms as
/* When disconnecting, mark all chat rooms as
* disconnected, so that they will be properly entered again
* when fetched from session storage.
*/
...
...
@@ -72439,8 +72429,6 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
_converse.on('chatBoxesFetched', autoJoinRooms);
_converse.on('reconnecting', disconnectChatRooms);
_converse.on('disconnecting', disconnectChatRooms);
/************************ END Event Handlers ************************/
src/converse-chatboxes.js
View file @
a3fe6162
...
...
@@ -567,8 +567,8 @@
b64_sha1
(
`converse.chatboxes-
${
_converse
.
bare_jid
}
`
));
this
.
registerMessageHandler
();
this
.
fetch
({
add
:
true
,
success
:
this
.
onChatBoxesFetched
.
bind
(
this
)
'
add
'
:
true
,
'
success
'
:
this
.
onChatBoxesFetched
.
bind
(
this
)
});
},
...
...
src/converse-muc.js
View file @
a3fe6162
...
...
@@ -1172,7 +1172,7 @@
}
function
disconnectChatRooms
()
{
/* When disconnecting,
or reconnecting,
mark all chat rooms as
/* When disconnecting, mark all chat rooms as
* disconnected, so that they will be properly entered again
* when fetched from session storage.
*/
...
...
@@ -1193,7 +1193,6 @@
}
});
_converse
.
on
(
'
chatBoxesFetched
'
,
autoJoinRooms
);
_converse
.
on
(
'
reconnecting
'
,
disconnectChatRooms
);
_converse
.
on
(
'
disconnecting
'
,
disconnectChatRooms
);
/************************ END Event Handlers ************************/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment