mirror of
https://github.com/plantroon/mx-puppet-xmpp.git
synced 2024-12-22 22:51:42 +00:00
various fixes
This commit is contained in:
parent
2610b20b2c
commit
d2019b0ccd
40
package-lock.json
generated
40
package-lock.json
generated
@ -98,9 +98,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@sorunome/skype-http": {
|
"@sorunome/skype-http": {
|
||||||
"version": "1.5.0",
|
"version": "1.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/@sorunome/skype-http/-/skype-http-1.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/@sorunome/skype-http/-/skype-http-1.5.1.tgz",
|
||||||
"integrity": "sha512-98CbzvtkvXprDIxsIHzKRbODDPAkbZNAbJcqPbXRR8IFMyjzcqgizns8PrfciQcF/e+XDjiWKGWuCBogV2Vi2g==",
|
"integrity": "sha512-dJ0fMeTmtzTUWbXN3+SCth8C9XElhrEkzbp454xyo0vXYyoPMbIUYuWeEas1hyeYjaqI9PdgTOe5xI9y+qr9/g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"async-file": "^2.0.2",
|
"async-file": "^2.0.2",
|
||||||
"big-integer": "^1.6.26",
|
"big-integer": "^1.6.26",
|
||||||
@ -114,18 +114,6 @@
|
|||||||
"lodash": "^4.17.15",
|
"lodash": "^4.17.15",
|
||||||
"tough-cookie": "^4.0.0",
|
"tough-cookie": "^4.0.0",
|
||||||
"tunnel": "0.0.6"
|
"tunnel": "0.0.6"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"tough-cookie": {
|
|
||||||
"version": "4.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz",
|
|
||||||
"integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==",
|
|
||||||
"requires": {
|
|
||||||
"psl": "^1.1.33",
|
|
||||||
"punycode": "^2.1.1",
|
|
||||||
"universalify": "^0.1.2"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@szmarczak/http-timer": {
|
"@szmarczak/http-timer": {
|
||||||
@ -1192,9 +1180,9 @@
|
|||||||
"integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg=="
|
"integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg=="
|
||||||
},
|
},
|
||||||
"incident": {
|
"incident": {
|
||||||
"version": "3.2.0",
|
"version": "3.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/incident/-/incident-3.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/incident/-/incident-3.2.1.tgz",
|
||||||
"integrity": "sha512-Hok2kKEfZorHNeLePZxe03JCI0KxaN4XwrbwHWMSgZgyuNP/Pu/vqX1bwtm7FgwdqgXvEwAmDS5VCAkXnH3DXg==",
|
"integrity": "sha512-Mejx4QijYGSBAaR8NobH5dhFC7h5q1bIClsAtdoTEl/YzqSYVE/5WgovlYUHqwdBTLHkptQ5bv9nJNsJCJDeXg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/object-inspect": "^1.4.0",
|
"@types/object-inspect": "^1.4.0",
|
||||||
"object-inspect": "^1.6.0"
|
"object-inspect": "^1.6.0"
|
||||||
@ -1893,9 +1881,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"psl": {
|
"psl": {
|
||||||
"version": "1.7.0",
|
"version": "1.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/psl/-/psl-1.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
|
||||||
"integrity": "sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ=="
|
"integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ=="
|
||||||
},
|
},
|
||||||
"pump": {
|
"pump": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
@ -2314,6 +2302,16 @@
|
|||||||
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
|
||||||
"integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
|
"integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
|
||||||
},
|
},
|
||||||
|
"tough-cookie": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==",
|
||||||
|
"requires": {
|
||||||
|
"psl": "^1.1.33",
|
||||||
|
"punycode": "^2.1.1",
|
||||||
|
"universalify": "^0.1.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"triple-beam": {
|
"triple-beam": {
|
||||||
"version": "1.3.0",
|
"version": "1.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz",
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
},
|
},
|
||||||
"author": "Sorunome",
|
"author": "Sorunome",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sorunome/skype-http": "^1.5.0",
|
"@sorunome/skype-http": "^1.5.1",
|
||||||
"cheerio": "^1.0.0-rc.3",
|
"cheerio": "^1.0.0-rc.3",
|
||||||
"command-line-args": "^5.1.1",
|
"command-line-args": "^5.1.1",
|
||||||
"command-line-usage": "^5.0.5",
|
"command-line-usage": "^5.0.5",
|
||||||
|
@ -27,8 +27,8 @@ const CONTACTS_DELTA_INTERVAL = 5 * 60 * 1000;
|
|||||||
// tslint:enable no-magic-numbers
|
// tslint:enable no-magic-numbers
|
||||||
|
|
||||||
export class Client extends EventEmitter {
|
export class Client extends EventEmitter {
|
||||||
public contacts: Map<string, SkypeContact | null> = new Map();
|
public contacts: Map<string, SkypeContact> = new Map();
|
||||||
public conversations: Map<string, skypeHttp.Conversation | null> = new Map();
|
public conversations: Map<string, skypeHttp.Conversation> = new Map();
|
||||||
private api: skypeHttp.Api;
|
private api: skypeHttp.Api;
|
||||||
private handledIds: ExpireSet<string>;
|
private handledIds: ExpireSet<string>;
|
||||||
private contactsInterval: NodeJS.Timeout | null = null;
|
private contactsInterval: NodeJS.Timeout | null = null;
|
||||||
@ -196,7 +196,6 @@ export class Client extends EventEmitter {
|
|||||||
// contact not found
|
// contact not found
|
||||||
log.debug("No such contact found");
|
log.debug("No such contact found");
|
||||||
log.debug(err.body || err);
|
log.debug(err.body || err);
|
||||||
this.contacts.set(fullId, null);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -228,7 +227,6 @@ export class Client extends EventEmitter {
|
|||||||
// conversation not found
|
// conversation not found
|
||||||
log.debug("No such conversation found");
|
log.debug("No such conversation found");
|
||||||
log.debug(err.body || err);
|
log.debug(err.body || err);
|
||||||
this.conversations.set(id, null);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -229,6 +229,7 @@ export class Skype {
|
|||||||
await this.puppet.sendStatusMessage(puppetId, "connected");
|
await this.puppet.sendStatusMessage(puppetId, "connected");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
log.error("Failed to connect", err.body || err);
|
log.error("Failed to connect", err.body || err);
|
||||||
|
p.data.state = undefined; // delete the sate so that we re-login for sure
|
||||||
await this.puppet.sendStatusMessage(puppetId, "Failed to connect, reconnecting in a minute... " + err);
|
await this.puppet.sendStatusMessage(puppetId, "Failed to connect, reconnecting in a minute... " + err);
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
await this.startClient(puppetId);
|
await this.startClient(puppetId);
|
||||||
|
Loading…
Reference in New Issue
Block a user