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
19ef0f8c
Commit
19ef0f8c
authored
Sep 03, 2015
by
Christoph
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #461: MUC working with spaces etc. in room names
parent
c9b0d4c8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
converse.js
converse.js
+5
-4
src/templates/chatroom.html
src/templates/chatroom.html
+1
-1
src/templates/room_item.html
src/templates/room_item.html
+1
-1
No files found.
converse.js
View file @
19ef0f8c
...
@@ -2319,15 +2319,16 @@
...
@@ -2319,15 +2319,16 @@
else
{
$nick
.
removeClass
(
'
error
'
);
}
else
{
$nick
.
removeClass
(
'
error
'
);
}
if
(
ev
.
type
===
'
click
'
)
{
if
(
ev
.
type
===
'
click
'
)
{
name
=
$
(
ev
.
target
).
text
();
jid
=
$
(
ev
.
target
).
attr
(
'
data-room-jid
'
);
jid
=
$
(
ev
.
target
).
attr
(
'
data-room-jid
'
);
}
else
{
}
else
{
$name
=
this
.
$el
.
find
(
'
input.new-chatroom-name
'
);
$name
=
this
.
$el
.
find
(
'
input.new-chatroom-name
'
);
$server
=
this
.
$el
.
find
(
'
input.new-chatroom-server
'
);
$server
=
this
.
$el
.
find
(
'
input.new-chatroom-server
'
);
server
=
$server
.
val
();
server
=
$server
.
val
();
name
=
$name
.
val
().
trim
()
.
toLowerCase
()
;
name
=
$name
.
val
().
trim
();
$name
.
val
(
''
);
// Clear the input
$name
.
val
(
''
);
// Clear the input
if
(
name
&&
server
)
{
if
(
name
&&
server
)
{
jid
=
Strophe
.
escapeNode
(
name
)
+
'
@
'
+
server
;
jid
=
Strophe
.
escapeNode
(
name
.
toLowerCase
()
)
+
'
@
'
+
server
;
$name
.
removeClass
(
'
error
'
);
$name
.
removeClass
(
'
error
'
);
$server
.
removeClass
(
'
error
'
);
$server
.
removeClass
(
'
error
'
);
this
.
model
.
save
({
muc_domain
:
server
});
this
.
model
.
save
({
muc_domain
:
server
});
...
@@ -2341,7 +2342,7 @@
...
@@ -2341,7 +2342,7 @@
chatroom
=
converse
.
chatboxviews
.
showChat
({
chatroom
=
converse
.
chatboxviews
.
showChat
({
'
id
'
:
jid
,
'
id
'
:
jid
,
'
jid
'
:
jid
,
'
jid
'
:
jid
,
'
name
'
:
Strophe
.
unescapeNode
(
Strophe
.
getNodeFromJid
(
jid
)),
'
name
'
:
name
||
Strophe
.
unescapeNode
(
Strophe
.
getNodeFromJid
(
jid
)),
'
nick
'
:
nick
,
'
nick
'
:
nick
,
'
chatroom
'
:
true
,
'
chatroom
'
:
true
,
'
box_id
'
:
b64_sha1
(
jid
)
'
box_id
'
:
b64_sha1
(
jid
)
...
@@ -3009,7 +3010,7 @@
...
@@ -3009,7 +3010,7 @@
getRoomJIDAndNick
:
function
(
nick
)
{
getRoomJIDAndNick
:
function
(
nick
)
{
nick
=
nick
||
this
.
model
.
get
(
'
nick
'
);
nick
=
nick
||
this
.
model
.
get
(
'
nick
'
);
var
room
=
this
.
model
.
get
(
'
jid
'
);
var
room
=
this
.
model
.
get
(
'
jid
'
);
var
node
=
Strophe
.
escapeNode
(
Strophe
.
getNodeFromJid
(
room
)
);
var
node
=
Strophe
.
getNodeFromJid
(
room
);
var
domain
=
Strophe
.
getDomainFromJid
(
room
);
var
domain
=
Strophe
.
getDomainFromJid
(
room
);
return
node
+
"
@
"
+
domain
+
(
nick
!==
null
?
"
/
"
+
nick
:
""
);
return
node
+
"
@
"
+
domain
+
(
nick
!==
null
?
"
/
"
+
nick
:
""
);
},
},
...
...
src/templates/chatroom.html
View file @
19ef0f8c
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<a
class=
"close-chatbox-button icon-close"
></a>
<a
class=
"close-chatbox-button icon-close"
></a>
<a
class=
"toggle-chatbox-button icon-minus"
></a>
<a
class=
"toggle-chatbox-button icon-minus"
></a>
<a
class=
"configure-chatroom-button icon-wrench"
style=
"display:none"
></a>
<a
class=
"configure-chatroom-button icon-wrench"
style=
"display:none"
></a>
<div
class=
"chat-title"
>
{{
name
}}
</div>
<div
class=
"chat-title"
>
{{
_.escape(name)
}}
</div>
<p
class=
"chatroom-topic"
><p/>
<p
class=
"chatroom-topic"
><p/>
</div>
</div>
<div
class=
"chat-body"
><span
class=
"spinner centered"
/></div>
<div
class=
"chat-body"
><span
class=
"spinner centered"
/></div>
...
...
src/templates/room_item.html
View file @
19ef0f8c
<dd
class=
"available-chatroom"
>
<dd
class=
"available-chatroom"
>
<a
class=
"open-room"
data-room-jid=
"{{jid}}"
<a
class=
"open-room"
data-room-jid=
"{{jid}}"
title=
"{{open_title}}"
href=
"#"
>
{{
name
}}
</a>
title=
"{{open_title}}"
href=
"#"
>
{{
_.escape(name)
}}
</a>
<a
class=
"room-info icon-room-info"
data-room-jid=
"{{jid}}"
<a
class=
"room-info icon-room-info"
data-room-jid=
"{{jid}}"
title=
"{{info_title}}"
href=
"#"
>
</a>
title=
"{{info_title}}"
href=
"#"
>
</a>
</dd>
</dd>
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