Mercurial > xmpp-account-manager
annotate nickname.js @ 47:b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 23 May 2020 20:20:25 +0200 |
parents | 084202870d76 |
children | 021185105e2f |
rev | line source |
---|---|
0 | 1 'use strict'; |
2 | |
3 function initNickname(connection) { | |
4 const nick_input = document.getElementById('nick'); | |
35
084202870d76
Add nickname access model configuration.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
34
diff
changeset
|
5 const nick_access = document.getElementById('nick-access'); |
10
e47b9bd55192
Also use a spinner on nickname get/set.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
7
diff
changeset
|
6 const spinner_img = document.getElementById('nick-spinner'); |
35
084202870d76
Add nickname access model configuration.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
34
diff
changeset
|
7 const access_spinner_img = document.getElementById('nick-access-spinner'); |
0 | 8 |
9 const iq = $iq({type: 'get'}) | |
10 .c('pubsub', {xmlns: 'http://jabber.org/protocol/pubsub'}) | |
11 .c('items', {node: 'http://jabber.org/protocol/nick'}); | |
47
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
12 connection.sendIQ(iq, onNickname, onNicknameRetrievalError); |
15
3eed9fe0bd7c
End spinners with either a green ✔ or a red ✘.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
11
diff
changeset
|
13 displaySpinner(spinner_img); |
47
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
14 retrieveConfiguration(); |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
15 displaySpinner(access_spinner_img); |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
16 |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
17 function retrieveConfiguration() |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
18 { |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
19 const iq = $iq({type: 'get'}) |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
20 .c('pubsub', {xmlns: 'http://jabber.org/protocol/pubsub#owner'}) |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
21 .c('configure', {node: 'http://jabber.org/protocol/nick'}); |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
22 connection.sendIQ(iq, onConfigure, onConfigureError); |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
23 } |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
24 |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
25 function onConfigure(result_iq) |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
26 { |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
27 const fields = parseXPath(result_iq, './pubsub_owner:pubsub/pubsub_owner:configure/dataforms:x/dataforms:field', XPathResult.UNORDERED_NODE_ITERATOR_TYPE); |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
28 if (fields === null) { |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
29 console.log('Failed to retrieve nickname configuration.'); |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
30 hideSpinner(spinner_img); |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
31 return; |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
32 } |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
33 let access_model = null; |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
34 while (true) { |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
35 const field = fields.iterateNext(); |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
36 if (field === null) |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
37 break; |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
38 const var_ = field.getAttributeNS(null, 'var'); |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
39 if (var_ === 'pubsub#access_model') { |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
40 const value = parseXPath(field, './dataforms:value'); |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
41 access_model = value.textContent; |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
42 } |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
43 } |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
44 if (access_model !== null) { |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
45 if (access_model === 'open') |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
46 nick_access.value = 'open'; |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
47 else if (access_model === 'presence') |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
48 nick_access.value = 'presence'; |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
49 else |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
50 console.log('Unsupported nickname access model: ' + access_model); |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
51 nick_access.disabled = false; |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
52 } |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
53 hideSpinner(access_spinner_img); |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
54 } |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
55 |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
56 function onConfigureError(iq) |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
57 { |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
58 console.log('Failed to retrieve nickname configuration: ' + parseErrorIq(iq)); |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
59 nick_access.disabled = true; |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
60 hideSpinner(access_spinner_img); |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
61 } |
0 | 62 |
63 function onNickname(result_iq) | |
64 { | |
65 const item = parseXPath(result_iq, './pubsub:pubsub/pubsub:items/pubsub:item'); | |
47
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
66 if (item == null) { |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
67 console.log('Failed to retrieve nickname: no item published.'); |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
68 hideSpinner(spinner_img); |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
69 return; |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
70 } |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
71 |
0 | 72 const id = item.getAttributeNS(null, 'id'); |
73 const nick = parseXPath(item, './nickname:nick'); | |
74 nick_input.value = nick.textContent; | |
15
3eed9fe0bd7c
End spinners with either a green ✔ or a red ✘.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
11
diff
changeset
|
75 hideSpinner(spinner_img); |
0 | 76 } |
77 | |
47
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
78 function onNicknameRetrievalError(iq) |
0 | 79 { |
47
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
80 console.log('Failed to retrieve nickname: ' + parseErrorIq(iq)); |
15
3eed9fe0bd7c
End spinners with either a green ✔ or a red ✘.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
11
diff
changeset
|
81 hideSpinner(spinner_img); |
0 | 82 } |
83 | |
34
45bd945c5722
Change all blur events to change, prevents a stanza when no change occured.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
15
diff
changeset
|
84 nick_input.addEventListener('change', function (evt) { |
47
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
85 const new_nickname = evt.target.value; |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
86 let iq; |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
87 let changed_callback; |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
88 if (new_nickname) { |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
89 iq = $iq({type: 'set'}) |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
90 .c('pubsub', {xmlns: 'http://jabber.org/protocol/pubsub'}) |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
91 .c('publish', {node: 'http://jabber.org/protocol/nick'}) |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
92 .c('item', {id: 'current'}) |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
93 .c('nick', {xmlns: 'http://jabber.org/protocol/nick'}) |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
94 .t(new_nickname); |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
95 changed_callback = onNicknameChanged.bind(null, 'changed'); |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
96 } else { |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
97 iq = $iq({type: 'set'}) |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
98 .c('pubsub', {xmlns: 'http://jabber.org/protocol/pubsub#owner'}) |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
99 .c('delete', {node: 'http://jabber.org/protocol/nick'}); |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
100 changed_callback = onNicknameChanged.bind(null, 'deleted'); |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
101 } |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
102 connection.sendIQ(iq, changed_callback, onNicknameChangeError); |
15
3eed9fe0bd7c
End spinners with either a green ✔ or a red ✘.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
11
diff
changeset
|
103 displaySpinner(spinner_img); |
0 | 104 }); |
105 | |
47
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
106 function onNicknameChanged(action, result_iq) |
0 | 107 { |
47
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
108 console.log('Nickname successfully ' + action + '.'); |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
109 nick_access.disabled = true; |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
110 if (action === 'changed') |
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
111 retrieveConfiguration(); |
15
3eed9fe0bd7c
End spinners with either a green ✔ or a red ✘.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
11
diff
changeset
|
112 spinnerOk(spinner_img); |
0 | 113 } |
114 | |
115 function onNicknameChangeError(iq) | |
116 { | |
47
b76146a09e07
Add pubsub#access_model retrieval for the nickname node.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
35
diff
changeset
|
117 console.log('onNicknameChangeError', iq); |
15
3eed9fe0bd7c
End spinners with either a green ✔ or a red ✘.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
11
diff
changeset
|
118 spinnerError(spinner_img); |
0 | 119 } |
35
084202870d76
Add nickname access model configuration.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
34
diff
changeset
|
120 |
084202870d76
Add nickname access model configuration.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
34
diff
changeset
|
121 nick_access.addEventListener('change', function (evt) { |
084202870d76
Add nickname access model configuration.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
34
diff
changeset
|
122 const iq = configurePEPField('http://jabber.org/protocol/nick', 'pubsub#access_model', evt.target.value); |
084202870d76
Add nickname access model configuration.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
34
diff
changeset
|
123 connection.sendIQ(iq, onNicknameConfigured, onNicknameConfigureError); |
084202870d76
Add nickname access model configuration.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
34
diff
changeset
|
124 displaySpinner(access_spinner_img); |
084202870d76
Add nickname access model configuration.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
34
diff
changeset
|
125 }); |
084202870d76
Add nickname access model configuration.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
34
diff
changeset
|
126 |
084202870d76
Add nickname access model configuration.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
34
diff
changeset
|
127 function onNicknameConfigured(iq) |
084202870d76
Add nickname access model configuration.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
34
diff
changeset
|
128 { |
084202870d76
Add nickname access model configuration.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
34
diff
changeset
|
129 console.log('Successfully set nickname access model.') |
084202870d76
Add nickname access model configuration.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
34
diff
changeset
|
130 spinnerOk(access_spinner_img); |
084202870d76
Add nickname access model configuration.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
34
diff
changeset
|
131 } |
084202870d76
Add nickname access model configuration.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
34
diff
changeset
|
132 |
084202870d76
Add nickname access model configuration.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
34
diff
changeset
|
133 function onNicknameConfigureError(iq) |
084202870d76
Add nickname access model configuration.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
34
diff
changeset
|
134 { |
084202870d76
Add nickname access model configuration.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
34
diff
changeset
|
135 const string = 'Failed to configure nick node: ' + parseErrorIq(iq); |
084202870d76
Add nickname access model configuration.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
34
diff
changeset
|
136 console.log(string); |
084202870d76
Add nickname access model configuration.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
34
diff
changeset
|
137 spinnerError(access_spinner_img, string); |
084202870d76
Add nickname access model configuration.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
34
diff
changeset
|
138 } |
0 | 139 } |