fix space_auth being overriden by unused parameter, add 'nickname' GET param

Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
This commit is contained in:
Julien Veyssier
2020-12-27 16:57:27 +01:00
parent 72221fcf0b
commit a184225c8b

View File

@@ -99,7 +99,7 @@ var SpacedeckSpaces = {
}.bind(this), {value: dft || "Guest "+parseInt(10000*Math.random()), ok: __("ok"), cancel: __("cancel")});
},
load_space: function(space_id, on_success, on_error, space_auth) {
load_space: function(space_id, on_success, on_error) {
this.folder_spaces_filter="";
this.folder_spaces_search="";
@@ -308,7 +308,8 @@ var SpacedeckSpaces = {
userReady();
}
if (!this.user && space_auth) {
if (!this.user.nickname && space_auth) {
this.guest_nickname = get_query_param("nickname") || this.guest_nickname;
if (this.guest_nickname) {
userReady();
} else {