Mercurial > xmpp-account-manager
comparison client.js @ 14:962f64b156dd
Stop hardcoding XEP-0156 file to the current domain.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 22 Dec 2018 18:10:58 +0100 |
parents | 8724e28ccbd7 |
children | 3eed9fe0bd7c |
comparison
equal
deleted
inserted
replaced
13:8724e28ccbd7 | 14:962f64b156dd |
---|---|
41 | 41 |
42 function getBOSHService(jid) | 42 function getBOSHService(jid) |
43 { | 43 { |
44 return new Promise((resolve, reject) => { | 44 return new Promise((resolve, reject) => { |
45 const [nodepart, domainpart] = jid.split('@', 2); | 45 const [nodepart, domainpart] = jid.split('@', 2); |
46 //const url = 'https://' + domainpart + '/.well-known/host-meta'; | 46 const url = 'https://' + domainpart + '/.well-known/host-meta'; |
47 const url = '/.well-known/host-meta'; | |
48 const xhr = new XMLHttpRequest(); | 47 const xhr = new XMLHttpRequest(); |
49 xhr.onload = function (evt) { | 48 xhr.onload = function (evt) { |
50 const xml = evt.target.responseXML; | 49 const xml = evt.target.responseXML; |
51 const links = parseXPath(xml, './xrd:XRD/xrd:Link', XPathResult.ORDERED_NODE_ITERATOR_TYPE); | 50 const links = parseXPath(xml, './xrd:XRD/xrd:Link', XPathResult.ORDERED_NODE_ITERATOR_TYPE); |
52 let bosh_service = null; | 51 let bosh_service = null; |