Commit 631c252e authored by JC Brand's avatar JC Brand

Next task is to render password form for restricted rooms

For now just make sure the user is informed that pw is required.
parent 01336fef
...@@ -1233,9 +1233,6 @@ ...@@ -1233,9 +1233,6 @@
}, },
onChatRoomPresence: function (presence, room) { onChatRoomPresence: function (presence, room) {
if (!this.$el.find('.chat-area').length) {
this.renderChatArea();
}
var nick = room.nick, var nick = room.nick,
$presence = $(presence), $presence = $(presence),
from = $presence.attr('from'), $item; from = $presence.attr('from'), $item;
...@@ -1264,6 +1261,8 @@ ...@@ -1264,6 +1261,8 @@
$chat_content = this.$el.find('.chat-content'); $chat_content = this.$el.find('.chat-content');
if ($error.attr('type') == 'auth') { if ($error.attr('type') == 'auth') {
if ($error.find('not-authorized').length) { if ($error.find('not-authorized').length) {
this.renderChatArea();
$chat_content = this.$el.find('.chat-content');
$chat_content.append('This chatroom requires a password'); $chat_content.append('This chatroom requires a password');
} else if ($error.find('registration-required').length) { } else if ($error.find('registration-required').length) {
$chat_content.append('You are not on the member list of this room'); $chat_content.append('You are not on the member list of this room');
......
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