Mercurial > xmpp-account-manager
changeset 21:cd35420457ac
Also configure the avatar data node’s access model.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sun, 23 Dec 2018 00:12:21 +0100 |
parents | 46660687924b |
children | 07e33207e598 |
files | avatar.js |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/avatar.js +++ b/avatar.js @@ -179,10 +179,16 @@ function initAvatar(connection) { avatar_access.addEventListener('change', function (evt) { const iq = configurePEPField('urn:xmpp:avatar:metadata', 'pubsub#access_model', evt.target.value); - connection.sendIQ(iq, onAvatarConfigured, onAvatarConfigureError.bind(null, 'PubSub configuration failed.')); + connection.sendIQ(iq, onAvatarMetadataConfigured, onAvatarConfigureError.bind(null, 'PubSub configuration of metadata failed.')); displaySpinner(access_model_spinner_img); }); + function onAvatarMetadataConfigured(result_iq) + { + const iq = configurePEPField('urn:xmpp:avatar:data', 'pubsub#access_model', evt.target.value); + connection.sendIQ(iq, onAvatarConfigured, onAvatarConfigureError.bind(null, 'PubSub configuration of data failed.')); + } + function onAvatarConfigured(result_iq) { console.log('Successfully set avatar access model.')