Commit c6708930 authored by JC Brand's avatar JC Brand

Bugfix. Arrays in configuration settings were ignored.

parent 5a72466c
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
- #721 keepalive not working with anonymous authentication [jcbrand] - #721 keepalive not working with anonymous authentication [jcbrand]
- Enable new rooms to be configured automatically, with a default config, via `rooms.open`. - Enable new rooms to be configured automatically, with a default config, via `rooms.open`.
For details, refer to the [relevant documentation](https://conversejs.org/docs/html/developer_api.html#the-rooms-grouping) [jcbrand] For details, refer to the [relevant documentation](https://conversejs.org/docs/html/developer_api.html#the-rooms-grouping) [jcbrand]
- Bugfix: Arrays in configuration settings were ignored. [jcbrand]
## 2.0.1 (2016-11-07) ## 2.0.1 (2016-11-07)
- #203 New configuration setting [muc_domain](https://conversejs.org/docs/html/configuration.html#muc_domain) [jcbrand] - #203 New configuration setting [muc_domain](https://conversejs.org/docs/html/configuration.html#muc_domain) [jcbrand]
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
show_toolbar: true, show_toolbar: true,
chatview_avatar_width: 32, chatview_avatar_width: 32,
chatview_avatar_height: 32, chatview_avatar_height: 32,
auto_join_rooms: [],
visible_toolbar_buttons: { visible_toolbar_buttons: {
'emoticons': true, 'emoticons': true,
'call': false, 'call': false,
...@@ -26,6 +27,9 @@ ...@@ -26,6 +27,9 @@
show_toolbar: false, show_toolbar: false,
chatview_avatar_width: 32, chatview_avatar_width: 32,
chatview_avatar_height: 48, chatview_avatar_height: 48,
auto_join_rooms: [
'anonymous@conference.nomnom.im',
],
visible_toolbar_buttons: { visible_toolbar_buttons: {
'emoticons': false, 'emoticons': false,
'call': false, 'call': false,
...@@ -44,6 +48,8 @@ ...@@ -44,6 +48,8 @@
expect(context.visible_toolbar_buttons.call).toBeFalsy(); expect(context.visible_toolbar_buttons.call).toBeFalsy();
expect(context.visible_toolbar_buttons.toggle_occupants).toBeFalsy(); expect(context.visible_toolbar_buttons.toggle_occupants).toBeFalsy();
expect(context.visible_toolbar_buttons.invalid).toBeFalsy(); expect(context.visible_toolbar_buttons.invalid).toBeFalsy();
expect(context.auto_join_rooms.length).toBe(1);
expect(context.auto_join_rooms[0]).toBe('anonymous@conference.nomnom.im');
user_settings = { user_settings = {
visible_toolbar_buttons: { visible_toolbar_buttons: {
......
...@@ -253,7 +253,7 @@ ...@@ -253,7 +253,7 @@
if (_.isUndefined(user_settings[k])) { if (_.isUndefined(user_settings[k])) {
continue; continue;
} }
if (_.isObject(settings[k])) { if (_.isObject(settings[k]) && !_.isArray(settings[k])) {
applyUserSettings(context[k], settings[k], user_settings[k]); applyUserSettings(context[k], settings[k], user_settings[k]);
} else { } else {
context[k] = user_settings[k]; context[k] = user_settings[k];
......
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