mirror of
https://github.com/plantroon/mx-puppet-xmpp.git
synced 2024-12-27 00:51:41 +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": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@sorunome/skype-http/-/skype-http-1.5.0.tgz",
|
||||
"integrity": "sha512-98CbzvtkvXprDIxsIHzKRbODDPAkbZNAbJcqPbXRR8IFMyjzcqgizns8PrfciQcF/e+XDjiWKGWuCBogV2Vi2g==",
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/@sorunome/skype-http/-/skype-http-1.5.1.tgz",
|
||||
"integrity": "sha512-dJ0fMeTmtzTUWbXN3+SCth8C9XElhrEkzbp454xyo0vXYyoPMbIUYuWeEas1hyeYjaqI9PdgTOe5xI9y+qr9/g==",
|
||||
"requires": {
|
||||
"async-file": "^2.0.2",
|
||||
"big-integer": "^1.6.26",
|
||||
@ -114,18 +114,6 @@
|
||||
"lodash": "^4.17.15",
|
||||
"tough-cookie": "^4.0.0",
|
||||
"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": {
|
||||
@ -1192,9 +1180,9 @@
|
||||
"integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg=="
|
||||
},
|
||||
"incident": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/incident/-/incident-3.2.0.tgz",
|
||||
"integrity": "sha512-Hok2kKEfZorHNeLePZxe03JCI0KxaN4XwrbwHWMSgZgyuNP/Pu/vqX1bwtm7FgwdqgXvEwAmDS5VCAkXnH3DXg==",
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/incident/-/incident-3.2.1.tgz",
|
||||
"integrity": "sha512-Mejx4QijYGSBAaR8NobH5dhFC7h5q1bIClsAtdoTEl/YzqSYVE/5WgovlYUHqwdBTLHkptQ5bv9nJNsJCJDeXg==",
|
||||
"requires": {
|
||||
"@types/object-inspect": "^1.4.0",
|
||||
"object-inspect": "^1.6.0"
|
||||
@ -1893,9 +1881,9 @@
|
||||
}
|
||||
},
|
||||
"psl": {
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/psl/-/psl-1.7.0.tgz",
|
||||
"integrity": "sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ=="
|
||||
"version": "1.8.0",
|
||||
"resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
|
||||
"integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ=="
|
||||
},
|
||||
"pump": {
|
||||
"version": "3.0.0",
|
||||
@ -2314,6 +2302,16 @@
|
||||
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
|
||||
"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": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz",
|
||||
|
@ -11,7 +11,7 @@
|
||||
},
|
||||
"author": "Sorunome",
|
||||
"dependencies": {
|
||||
"@sorunome/skype-http": "^1.5.0",
|
||||
"@sorunome/skype-http": "^1.5.1",
|
||||
"cheerio": "^1.0.0-rc.3",
|
||||
"command-line-args": "^5.1.1",
|
||||
"command-line-usage": "^5.0.5",
|
||||
|
@ -27,8 +27,8 @@ const CONTACTS_DELTA_INTERVAL = 5 * 60 * 1000;
|
||||
// tslint:enable no-magic-numbers
|
||||
|
||||
export class Client extends EventEmitter {
|
||||
public contacts: Map<string, SkypeContact | null> = new Map();
|
||||
public conversations: Map<string, skypeHttp.Conversation | null> = new Map();
|
||||
public contacts: Map<string, SkypeContact> = new Map();
|
||||
public conversations: Map<string, skypeHttp.Conversation> = new Map();
|
||||
private api: skypeHttp.Api;
|
||||
private handledIds: ExpireSet<string>;
|
||||
private contactsInterval: NodeJS.Timeout | null = null;
|
||||
@ -196,7 +196,6 @@ export class Client extends EventEmitter {
|
||||
// contact not found
|
||||
log.debug("No such contact found");
|
||||
log.debug(err.body || err);
|
||||
this.contacts.set(fullId, null);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -228,7 +227,6 @@ export class Client extends EventEmitter {
|
||||
// conversation not found
|
||||
log.debug("No such conversation found");
|
||||
log.debug(err.body || err);
|
||||
this.conversations.set(id, null);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -229,6 +229,7 @@ export class Skype {
|
||||
await this.puppet.sendStatusMessage(puppetId, "connected");
|
||||
} catch (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);
|
||||
setTimeout(async () => {
|
||||
await this.startClient(puppetId);
|
||||
|
Loading…
Reference in New Issue
Block a user