Commit 86dc3800 authored by JC Brand's avatar JC Brand

Render nickname form when entering a room via invitation

parent ebc8d243
......@@ -16,10 +16,11 @@
[jcbrand]
- API change: the `message` event now returns a data object with `stanza` and
`chatbox` attributes, instead of just the stanza. [jcbrand]
- Remove all inline CSS to comply with strict Content-Security-Policy headers [mathiasertl]
- Render nickname form when entering a room via invitation. [jcbrand]
- #567 Unreaded message count reset on page load [novokrest]
- #591 Unread message counter is reset when the chatbox is closed [novokrest]
- #754 Show unread messages next to roster contacts. [jcbrand]
- #864 Remove all inline CSS to comply with strict Content-Security-Policy headers [mathiasertl]
- #873 Inconsistent unread messages count updating [novokrest]
## 3.0.2 (2017-04-23)
......
......@@ -1521,14 +1521,14 @@
* chat room with it.
*/
ev.preventDefault();
var $nick = this.$el.find('input[name=nick]');
var nick = $nick.val();
var nick_el = ev.target.nick;
var nick = nick_el.value;
if (!nick) {
$nick.addClass('error');
nick_el.classList.add('error');
return;
}
else {
$nick.removeClass('error');
nick_el.classList.remove('error');
}
this.$el.find('.chatroom-form-container')
.replaceWith('<span class="spinner centered"/>');
......@@ -2632,7 +2632,6 @@
'id': room_jid,
'jid': room_jid,
'name': Strophe.unescapeNode(Strophe.getNodeFromJid(room_jid)),
'nick': Strophe.unescapeNode(Strophe.getNodeFromJid(_converse.connection.jid)),
'type': 'chatroom',
'box_id': b64_sha1(room_jid),
'password': $x.attr('password')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment