Mercurial > xmpp-account-manager
diff nickname.js @ 52:2f45bee88b47
Add pubsub#access_model retrieval for the avatar node.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 23 May 2020 21:24:34 +0200 |
parents | 021185105e2f |
children | 9ada1963558c |
line wrap: on
line diff
--- a/nickname.js +++ b/nickname.js @@ -11,13 +11,13 @@ function initNickname(connection) { .c('items', {node: 'http://jabber.org/protocol/nick'}); connection.sendIQ(iq, onNickname, onNicknameRetrievalError); displaySpinner(spinner_img); - getNicknameAccessModel(); - displaySpinner(access_spinner_img); + getAccessModel(); - function getNicknameAccessModel() + function getAccessModel() { - retrieveConfiguration(connection).then((access_model) => { - console.log('yay', access_model); + nick_access.disabled = true; + displaySpinner(access_spinner_img); + retrieveConfiguration(connection, 'http://jabber.org/protocol/nick').then((access_model) => { if (access_model !== null) { if (access_model === 'open') nick_access.value = 'open'; @@ -82,7 +82,7 @@ function initNickname(connection) { console.log('Nickname successfully ' + action + '.'); nick_access.disabled = true; if (action === 'changed') - getNicknameAccessModel(); + getAccessModel(); spinnerOk(spinner_img); }