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
5e6a6ba6
Commit
5e6a6ba6
authored
Jan 08, 2021
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing bookmark tests
parent
9a267845
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
7 deletions
+6
-7
src/headless/plugins/bookmarks/collection.js
src/headless/plugins/bookmarks/collection.js
+2
-4
src/headless/plugins/bookmarks/index.js
src/headless/plugins/bookmarks/index.js
+1
-1
src/headless/plugins/bookmarks/model.js
src/headless/plugins/bookmarks/model.js
+3
-2
No files found.
src/headless/plugins/bookmarks/collection.js
View file @
5e6a6ba6
import
"
@converse/headless/plugins/muc/index.js
"
;
import
"
@converse/headless/plugins/muc/index.js
"
;
import
Bookmark
from
'
./model.js
'
;
import
log
from
"
@converse/headless/log.js
"
;
import
log
from
"
@converse/headless/log.js
"
;
import
{
__
}
from
'
i18n
'
;
import
{
__
}
from
'
i18n
'
;
import
{
_converse
,
api
,
converse
}
from
"
@converse/headless/core
"
;
import
{
_converse
,
api
,
converse
}
from
"
@converse/headless/core
"
;
...
@@ -9,6 +10,7 @@ const u = converse.env.utils;
...
@@ -9,6 +10,7 @@ const u = converse.env.utils;
const
Bookmarks
=
{
const
Bookmarks
=
{
model
:
Bookmark
,
comparator
:
(
item
)
=>
item
.
get
(
'
name
'
).
toLowerCase
(),
comparator
:
(
item
)
=>
item
.
get
(
'
name
'
).
toLowerCase
(),
initialize
()
{
initialize
()
{
...
@@ -25,10 +27,6 @@ const Bookmarks = {
...
@@ -25,10 +27,6 @@ const Bookmarks = {
this
.
browserStorage
=
_converse
.
createStore
(
cache_key
);
this
.
browserStorage
=
_converse
.
createStore
(
cache_key
);
},
},
model
(
attrs
,
options
)
{
return
new
_converse
.
Bookmark
(
attrs
,
options
);
},
async
openBookmarkedRoom
(
bookmark
)
{
async
openBookmarkedRoom
(
bookmark
)
{
if
(
api
.
settings
.
get
(
'
muc_respect_autojoin
'
)
&&
bookmark
.
get
(
'
autojoin
'
))
{
if
(
api
.
settings
.
get
(
'
muc_respect_autojoin
'
)
&&
bookmark
.
get
(
'
autojoin
'
))
{
const
groupchat
=
await
api
.
rooms
.
create
(
const
groupchat
=
await
api
.
rooms
.
create
(
...
...
src/headless/plugins/bookmarks/index.js
View file @
5e6a6ba6
...
@@ -102,7 +102,7 @@ converse.plugins.add('converse-bookmarks', {
...
@@ -102,7 +102,7 @@ converse.plugins.add('converse-bookmarks', {
api
.
promises
.
add
(
'
bookmarksInitialized
'
);
api
.
promises
.
add
(
'
bookmarksInitialized
'
);
_converse
.
Bookmark
=
Model
.
extend
(
Bookmark
)
;
_converse
.
Bookmark
=
Bookmark
;
_converse
.
Bookmarks
=
Collection
.
extend
(
Bookmarks
);
_converse
.
Bookmarks
=
Collection
.
extend
(
Bookmarks
);
_converse
.
BookmarksList
=
Model
.
extend
({
_converse
.
BookmarksList
=
Model
.
extend
({
...
...
src/headless/plugins/bookmarks/model.js
View file @
5e6a6ba6
import
{
converse
}
from
'
@converse/headless/core
'
;
import
{
converse
}
from
'
@converse/headless/core
'
;
import
{
Model
}
from
'
@converse/skeletor/src/model.js
'
;
const
{
Strophe
}
=
converse
.
env
;
const
{
Strophe
}
=
converse
.
env
;
const
Bookmark
=
{
const
Bookmark
=
Model
.
extend
(
{
idAttribute
:
'
jid
'
,
idAttribute
:
'
jid
'
,
getDisplayName
()
{
getDisplayName
()
{
return
Strophe
.
xmlunescape
(
this
.
get
(
'
name
'
));
return
Strophe
.
xmlunescape
(
this
.
get
(
'
name
'
));
}
}
};
}
)
;
export
default
Bookmark
;
export
default
Bookmark
;
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