Fixes #967. Rooms list not shown when server doesn't support bookmarks

This commit is contained in:
JC Brand 2017-12-19 13:56:32 +00:00
parent 349d097e0a
commit 21241c5cff
3 changed files with 7 additions and 3 deletions

View File

@ -6,6 +6,7 @@
- #800 Could not register successfully in ejabberd 17.01
- #949 Don't flash the roster contacts filter (i.e. hide by default)
- #953 MUC "Features" displayed when exiting configuration
- #967 Rooms list doesn't show when the server doesn't support bookmarks
- Don't require `auto_login` to be `true` when using the API to log in.
- Moment locale wasn't being set to the value passed via the `i18n` option.
- In the chat heading, two avatars sometimes get rendered.

View File

@ -385,7 +385,7 @@
_converse.log('Error while fetching bookmarks', Strophe.LogLevel.WARN);
_converse.log(iq.outerHTML, Strophe.LogLevel.DEBUG);
if (!_.isNil(deferred)) {
return deferred.reject();
return deferred.reject(new Error("Could not fetch bookmarks"));
}
}
});
@ -517,10 +517,13 @@
return;
}
_converse.bookmarks = new _converse.Bookmarks();
_converse.bookmarks.fetchBookmarks().then(function () {
_converse.bookmarks.fetchBookmarks().then(() => {
_converse.bookmarksview = new _converse.BookmarksView(
{'model': _converse.bookmarks}
);
})
.catch(_.partial(_converse.log, _, Strophe.LogLevel.ERROR))
.then(() => {
_converse.emit('bookmarksInitialized');
});
};

View File

@ -33,7 +33,7 @@
*
* NB: These plugins need to have already been loaded via require.js.
*/
optional_dependencies: ["converse-bookmarks"],
optional_dependencies: ["converse-controlbox", "converse-muc", "converse-bookmarks"],
initialize () {
/* The initialize function gets called as soon as the plugin is