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
78865bbc
Commit
78865bbc
authored
Feb 28, 2017
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't show the features heading if we don't know of any
parent
a3407bb9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
13 deletions
+15
-13
src/converse-muc.js
src/converse-muc.js
+13
-13
src/templates/chatroom_features.html
src/templates/chatroom_features.html
+2
-0
No files found.
src/converse-muc.js
View file @
78865bbc
...
...
@@ -75,6 +75,12 @@
Strophe
.
addNamespace
(
'
MUC_ROOMCONF
'
,
Strophe
.
NS
.
MUC
+
"
#roomconfig
"
);
Strophe
.
addNamespace
(
'
MUC_USER
'
,
Strophe
.
NS
.
MUC
+
"
#user
"
);
var
ROOM_FEATURES
=
[
'
passwordprotected
'
,
'
unsecured
'
,
'
hidden
'
,
'
public
'
,
'
membersonly
'
,
'
open
'
,
'
persistent
'
,
'
temporary
'
,
'
nonanonymous
'
,
'
semianonymous
'
,
'
moderated
'
,
'
unmoderated
'
,
'
mam_enabled
'
];
var
ROOMSTATUS
=
{
CONNECTED
:
0
,
CONNECTING
:
1
,
...
...
@@ -294,27 +300,18 @@
* are correct, for example that the "type" is set to
* "chatroom".
*/
settings
=
_
.
extend
(
_
.
zipObject
(
ROOM_FEATURES
,
_
.
map
(
ROOM_FEATURES
,
_
.
stubFalse
)),
settings
);
return
_converse
.
chatboxviews
.
showChat
(
_
.
extend
({
'
affiliation
'
:
null
,
'
connection_status
'
:
ROOMSTATUS
.
DISCONNECTED
,
'
description
'
:
''
,
'
features_fetched
'
:
false
,
'
hidden
'
:
false
,
'
mam_enabled
'
:
false
,
'
membersonly
'
:
false
,
'
moderated
'
:
false
,
'
nonanonymous
'
:
false
,
'
open
'
:
false
,
'
passwordprotected
'
:
false
,
'
persistent
'
:
false
,
'
public
'
:
false
,
'
roomconfig
'
:
{},
'
semianonymous
'
:
false
,
'
temporary
'
:
false
,
'
type
'
:
'
chatroom
'
,
'
unmoderated
'
:
false
,
'
unsecured
'
:
false
,
},
settings
)
);
};
...
...
@@ -2007,9 +2004,12 @@
},
renderRoomFeatures
:
function
()
{
var
picks
=
_
.
pick
(
this
.
chatroomview
.
model
.
attributes
,
ROOM_FEATURES
),
iteratee
=
function
(
a
,
v
)
{
return
a
||
v
;
};
this
.
$
(
'
.chatroom-features
'
).
html
(
tpl_chatroom_features
(
_
.
extend
(
this
.
chatroomview
.
model
.
toJSON
(),
{
'
has_features
'
:
_
.
reduce
(
_
.
values
(
picks
),
iteratee
),
'
label_features
'
:
__
(
'
Features
'
),
'
label_hidden
'
:
__
(
'
Hidden
'
),
'
label_mam_enabled
'
:
__
(
'
Message archiving
'
),
...
...
src/templates/chatroom_features.html
View file @
78865bbc
{[ if (has_features) { ]}
<p
class=
"occupants-heading"
>
{{{label_features}}}
</p>
{[ } ]}
<ul
class=
"features-list"
>
{[ if (passwordprotected) { ]}
<li
class=
"feature"
title=
"{{{ tt_passwordprotected }}}"
><span
class=
"icon-lock-2"
></span>
{{{ label_passwordprotected }}}
</li>
...
...
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