Commit 2fb435b2 authored by JC Brand's avatar JC Brand

Don't assume id of "current" for bookmarks' PEP node

Causes problems with some versions of Ejabberd which use a different id.
Will be fixed in upcoming versions.
parent 77501945
...@@ -48817,7 +48817,7 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_0__["default"].plugins ...@@ -48817,7 +48817,7 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_0__["default"].plugins
}, },
createBookmarksFromStanza(stanza) { createBookmarksFromStanza(stanza) {
const bookmarks = sizzle('items[node="storage:bookmarks"] ' + 'item#current ' + 'storage[xmlns="storage:bookmarks"] ' + 'conference', stanza); const bookmarks = sizzle(`items[node="storage:bookmarks"] item storage[xmlns="storage:bookmarks"] conference`, stanza);
_.forEach(bookmarks, bookmark => { _.forEach(bookmarks, bookmark => {
const jid = bookmark.getAttribute('jid'); const jid = bookmark.getAttribute('jid');
...@@ -351,12 +351,9 @@ converse.plugins.add('converse-bookmarks', { ...@@ -351,12 +351,9 @@ converse.plugins.add('converse-bookmarks', {
createBookmarksFromStanza (stanza) { createBookmarksFromStanza (stanza) {
const bookmarks = sizzle( const bookmarks = sizzle(
'items[node="storage:bookmarks"] '+ `items[node="storage:bookmarks"] item storage[xmlns="storage:bookmarks"] conference`,
'item#current '+
'storage[xmlns="storage:bookmarks"] '+
'conference',
stanza stanza
) );
_.forEach(bookmarks, (bookmark) => { _.forEach(bookmarks, (bookmark) => {
const jid = bookmark.getAttribute('jid'); const jid = bookmark.getAttribute('jid');
this.create({ this.create({
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment