Name2key, Group chat, Group invite / group invite accept / group invite reject

This commit is contained in:
Casper Warden
2017-12-14 18:22:41 +00:00
parent 65526c6d21
commit eab57f8ced
33 changed files with 526 additions and 21 deletions

11
dist/classes/Caps.js vendored
View File

@@ -196,7 +196,16 @@ class Caps {
return new Promise((resolve, reject) => {
this.getCapability(capability).then((url) => {
this.request(url, LLSD.LLSD.formatXML(data), 'application/llsd+xml').then((body) => {
resolve(LLSD.LLSD.parseXML(body));
let result = null;
try {
result = LLSD.LLSD.parseXML(body);
}
catch (err) {
console.error('Error parsing LLSD');
console.error(body);
reject(err);
}
resolve(result);
}).catch((err) => {
console.error(err);
reject(err);