Mercurial > xmpp-account-manager
diff avatar.js @ 1:d6df73b466f6
Implement XEP-0156 to discover the right BOSH endpoint.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Fri, 21 Dec 2018 23:44:18 +0100 |
parents | 2a8d4e8600d0 |
children | db033e5eabcb |
line wrap: on
line diff
--- a/avatar.js +++ b/avatar.js @@ -148,19 +148,6 @@ function initAvatar(connection) { sha1_reader.readAsArrayBuffer(file); }); - function nsResolver(prefix) { - return { - pubsub: 'http://jabber.org/protocol/pubsub', - avatar_metadata: 'urn:xmpp:avatar:metadata', - avatar_data: 'urn:xmpp:avatar:data', - }[prefix] || null; - } - - function parseXPath(elem, xpath) - { - return elem.getRootNode().evaluate(xpath, elem, nsResolver, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; - } - function friendlyDataSize(bytes) { let unit = 'B' if (bytes >= 1024) {