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
6a87caad
Commit
6a87caad
authored
Oct 27, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use template literals for translated strings
parent
adbee2af
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
src/converse-muc-views.js
src/converse-muc-views.js
+4
-4
src/headless/converse-muc.js
src/headless/converse-muc.js
+2
-2
No files found.
src/converse-muc-views.js
View file @
6a87caad
...
@@ -640,7 +640,7 @@ converse.plugins.add('converse-muc-views', {
...
@@ -640,7 +640,7 @@ converse.plugins.add('converse-muc-views', {
}
else
if
(
current_affiliation
===
'
outcast
'
)
{
}
else
if
(
current_affiliation
===
'
outcast
'
)
{
this
.
showChatEvent
(
__
(
"
%1$s has been banned from this groupchat
"
,
occupant
.
get
(
'
nick
'
)))
this
.
showChatEvent
(
__
(
"
%1$s has been banned from this groupchat
"
,
occupant
.
get
(
'
nick
'
)))
}
else
if
(
current_affiliation
===
'
admin
'
||
current_affiliation
==
'
owner
'
)
{
}
else
if
(
current_affiliation
===
'
admin
'
||
current_affiliation
==
'
owner
'
)
{
this
.
showChatEvent
(
__
(
`%1$s is now an
${
current_affiliation
}
of this groupchat`
,
occupant
.
get
(
'
nick
'
)
))
this
.
showChatEvent
(
__
(
'
%1$s is now an %2$s of this groupchat
'
,
occupant
.
get
(
'
nick
'
),
current_affiliation
))
}
}
},
},
...
@@ -820,7 +820,7 @@ converse.plugins.add('converse-muc-views', {
...
@@ -820,7 +820,7 @@ converse.plugins.add('converse-muc-views', {
verifyRoles
(
roles
)
{
verifyRoles
(
roles
)
{
const
me
=
this
.
model
.
occupants
.
findWhere
({
'
jid
'
:
_converse
.
bare_jid
});
const
me
=
this
.
model
.
occupants
.
findWhere
({
'
jid
'
:
_converse
.
bare_jid
});
if
(
!
_
.
includes
(
roles
,
me
.
get
(
'
role
'
)))
{
if
(
!
_
.
includes
(
roles
,
me
.
get
(
'
role
'
)))
{
this
.
showErrorMessage
(
__
(
`Forbidden: you do not have the necessary role in order to do that.`
))
this
.
showErrorMessage
(
__
(
'
Forbidden: you do not have the necessary role in order to do that.
'
))
return
false
;
return
false
;
}
}
return
true
;
return
true
;
...
@@ -829,7 +829,7 @@ converse.plugins.add('converse-muc-views', {
...
@@ -829,7 +829,7 @@ converse.plugins.add('converse-muc-views', {
verifyAffiliations
(
affiliations
)
{
verifyAffiliations
(
affiliations
)
{
const
me
=
this
.
model
.
occupants
.
findWhere
({
'
jid
'
:
_converse
.
bare_jid
});
const
me
=
this
.
model
.
occupants
.
findWhere
({
'
jid
'
:
_converse
.
bare_jid
});
if
(
!
_
.
includes
(
affiliations
,
me
.
get
(
'
affiliation
'
)))
{
if
(
!
_
.
includes
(
affiliations
,
me
.
get
(
'
affiliation
'
)))
{
this
.
showErrorMessage
(
__
(
`Forbidden: you do not have the necessary affiliation in order to do that.`
))
this
.
showErrorMessage
(
__
(
'
Forbidden: you do not have the necessary affiliation in order to do that.
'
))
return
false
;
return
false
;
}
}
return
true
;
return
true
;
...
@@ -986,7 +986,7 @@ converse.plugins.add('converse-muc-views', {
...
@@ -986,7 +986,7 @@ converse.plugins.add('converse-muc-views', {
break
;
break
;
case
'
register
'
:
case
'
register
'
:
if
(
args
.
length
>
1
)
{
if
(
args
.
length
>
1
)
{
this
.
showErrorMessage
(
__
(
`Error: invalid number of arguments`
))
this
.
showErrorMessage
(
__
(
'
Error: invalid number of arguments
'
))
}
else
{
}
else
{
this
.
model
.
registerNickname
().
then
(
err_msg
=>
{
this
.
model
.
registerNickname
().
then
(
err_msg
=>
{
if
(
err_msg
)
this
.
showErrorMessage
(
err_msg
)
if
(
err_msg
)
this
.
showErrorMessage
(
err_msg
)
...
...
src/headless/converse-muc.js
View file @
6a87caad
...
@@ -1308,9 +1308,9 @@ converse.plugins.add('converse-muc', {
...
@@ -1308,9 +1308,9 @@ converse.plugins.add('converse-muc', {
}).
catch
(
iq
=>
{
}).
catch
(
iq
=>
{
if
(
sizzle
(
'
item-not-found[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]
'
,
iq
).
length
)
{
if
(
sizzle
(
'
item-not-found[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]
'
,
iq
).
length
)
{
this
.
feedback
.
set
(
'
error
'
,
__
(
`Error: the groupchat
${
this
.
model
.
getDisplayName
()}
does not exist.`
));
this
.
feedback
.
set
(
'
error
'
,
__
(
'
Error: the groupchat %1$s does not exist.
'
,
this
.
model
.
getDisplayName
()
));
}
else
if
(
sizzle
(
'
not-allowed[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]
'
).
length
)
{
}
else
if
(
sizzle
(
'
not-allowed[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]
'
).
length
)
{
this
.
feedback
.
set
(
'
error
'
,
__
(
`Sorry, you're not allowed to register in this groupchat`
));
this
.
feedback
.
set
(
'
error
'
,
__
(
"
Sorry, you're not allowed to register in this groupchat
"
));
}
}
});
});
}
}
...
...
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