Mercurial > xmpp-account-manager
comparison nickname.js @ 11:aedf80eefc19
Also use a spinner on avatar get/set.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 22 Dec 2018 16:19:08 +0100 |
parents | e47b9bd55192 |
children | 3eed9fe0bd7c |
comparison
equal
deleted
inserted
replaced
10:e47b9bd55192 | 11:aedf80eefc19 |
---|---|
6 | 6 |
7 const iq = $iq({type: 'get'}) | 7 const iq = $iq({type: 'get'}) |
8 .c('pubsub', {xmlns: 'http://jabber.org/protocol/pubsub'}) | 8 .c('pubsub', {xmlns: 'http://jabber.org/protocol/pubsub'}) |
9 .c('items', {node: 'http://jabber.org/protocol/nick'}); | 9 .c('items', {node: 'http://jabber.org/protocol/nick'}); |
10 connection.sendIQ(iq, onNickname, onNicknameRetrievalError.bind(null, 'PubSub query failed.')); | 10 connection.sendIQ(iq, onNickname, onNicknameRetrievalError.bind(null, 'PubSub query failed.')); |
11 spinner_img.hidden = false; | |
11 | 12 |
12 function onNickname(result_iq) | 13 function onNickname(result_iq) |
13 { | 14 { |
14 const item = parseXPath(result_iq, './pubsub:pubsub/pubsub:items/pubsub:item'); | 15 const item = parseXPath(result_iq, './pubsub:pubsub/pubsub:items/pubsub:item'); |
15 if (item == null) | 16 if (item == null) |