diff nickname.js @ 54:9ada1963558c

Disable the avatar access_model in more cases.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sat, 23 May 2020 21:37:09 +0200
parents 2f45bee88b47
children 6d861d881b96
line wrap: on
line diff
--- a/nickname.js
+++ b/nickname.js
@@ -53,6 +53,7 @@ function initNickname(connection) {
     {
         console.log('Failed to retrieve nickname: ' + parseErrorIq(iq));
         hideSpinner(spinner_img);
+        nick_access.disabled = true;
     }
 
     nick_input.addEventListener('change', function (evt) {
@@ -75,6 +76,7 @@ function initNickname(connection) {
         }
         connection.sendIQ(iq, changed_callback, onNicknameChangeError);
         displaySpinner(spinner_img);
+        nick_access.disabled = true;
     });
 
     function onNicknameChanged(action, result_iq)
@@ -90,6 +92,7 @@ function initNickname(connection) {
     {
         console.log('onNicknameChangeError', iq);
         spinnerError(spinner_img);
+        nick_access.disabled = true;
     }
 
     nick_access.addEventListener('change', function (evt) {