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
4f705369
Commit
4f705369
authored
May 13, 2019
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace _.each and _.map with native methods
parent
ca5b6f9f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/headless/converse-chatboxes.js
src/headless/converse-chatboxes.js
+4
-4
No files found.
src/headless/converse-chatboxes.js
View file @
4f705369
...
@@ -626,7 +626,7 @@ converse.plugins.add('converse-chatboxes', {
...
@@ -626,7 +626,7 @@ converse.plugins.add('converse-chatboxes', {
});
});
return
;
return
;
}
}
_
.
each
(
files
,
(
file
)
=>
{
files
.
forEach
(
file
=>
{
if
(
!
window
.
isNaN
(
max_file_size
)
&&
window
.
parseInt
(
file
.
size
)
>
max_file_size
)
{
if
(
!
window
.
isNaN
(
max_file_size
)
&&
window
.
parseInt
(
file
.
size
)
>
max_file_size
)
{
return
this
.
messages
.
create
({
return
this
.
messages
.
create
({
'
message
'
:
__
(
'
The size of your file, %1$s, exceeds the maximum allowed by your server, which is %2$s.
'
,
'
message
'
:
__
(
'
The size of your file, %1$s, exceeds the maximum allowed by your server, which is %2$s.
'
,
...
@@ -762,7 +762,7 @@ converse.plugins.add('converse-chatboxes', {
...
@@ -762,7 +762,7 @@ converse.plugins.add('converse-chatboxes', {
attrs
.
fullname
=
this
.
get
(
'
fullname
'
)
||
this
.
get
(
'
fullname
'
)
attrs
.
fullname
=
this
.
get
(
'
fullname
'
)
||
this
.
get
(
'
fullname
'
)
}
}
}
}
_
.
each
(
sizzle
(
`x[xmlns="
${
Strophe
.
NS
.
OUTOFBAND
}
"]`
,
stanza
),
(
xform
)
=>
{
sizzle
(
`x[xmlns="
${
Strophe
.
NS
.
OUTOFBAND
}
"]`
,
stanza
).
forEach
(
xform
=>
{
attrs
[
'
oob_url
'
]
=
xform
.
querySelector
(
'
url
'
).
textContent
;
attrs
[
'
oob_url
'
]
=
xform
.
querySelector
(
'
url
'
).
textContent
;
attrs
[
'
oob_desc
'
]
=
xform
.
querySelector
(
'
url
'
).
textContent
;
attrs
[
'
oob_desc
'
]
=
xform
.
querySelector
(
'
url
'
).
textContent
;
});
});
...
@@ -1029,7 +1029,7 @@ converse.plugins.add('converse-chatboxes', {
...
@@ -1029,7 +1029,7 @@ converse.plugins.add('converse-chatboxes', {
/* Automatically join private chats, based on the
/* Automatically join private chats, based on the
* "auto_join_private_chats" configuration setting.
* "auto_join_private_chats" configuration setting.
*/
*/
_
.
each
(
_converse
.
auto_join_private_chats
,
function
(
jid
)
{
_
converse
.
auto_join_private_chats
.
forEach
(
jid
=>
{
if
(
_converse
.
chatboxes
.
where
({
'
jid
'
:
jid
}).
length
)
{
if
(
_converse
.
chatboxes
.
where
({
'
jid
'
:
jid
}).
length
)
{
return
;
return
;
}
}
...
@@ -1210,7 +1210,7 @@ converse.plugins.add('converse-chatboxes', {
...
@@ -1210,7 +1210,7 @@ converse.plugins.add('converse-chatboxes', {
}
else
if
(
_
.
isString
(
jids
))
{
}
else
if
(
_
.
isString
(
jids
))
{
return
_converse
.
chatboxes
.
getChatBox
(
jids
);
return
_converse
.
chatboxes
.
getChatBox
(
jids
);
}
}
return
_
.
map
(
jids
,
_
.
partial
(
_converse
.
chatboxes
.
getChatBox
.
bind
(
_converse
.
chatboxes
),
_
,
{},
true
));
return
jids
.
map
(
_
.
partial
(
_converse
.
chatboxes
.
getChatBox
.
bind
(
_converse
.
chatboxes
),
_
,
{},
true
));
}
}
}
}
});
});
...
...
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