mirror of
https://github.com/plantroon/mx-puppet-xmpp.git
synced 2024-11-14 23:41:40 +00:00
Merge branch 'feature/spaced-password' of https://github.com/tchapi/mx-puppet-skype
This commit is contained in:
commit
d627758dd6
@ -238,7 +238,7 @@ export class Client extends EventEmitter {
|
|||||||
}
|
}
|
||||||
const cookieJar = new toughCookie.CookieJar(this.api.context.cookies);
|
const cookieJar = new toughCookie.CookieJar(this.api.context.cookies);
|
||||||
return await Util.DownloadFile(url, {
|
return await Util.DownloadFile(url, {
|
||||||
responseType: "buffer",
|
responseType: "buffer",
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: "skypetoken=" + this.api.context.skypeToken.value,
|
Authorization: "skypetoken=" + this.api.context.skypeToken.value,
|
||||||
RegistrationToken: this.api.context.registrationToken.raw,
|
RegistrationToken: this.api.context.registrationToken.raw,
|
||||||
|
@ -46,7 +46,7 @@ if (options.help) {
|
|||||||
console.log(commandLineUsage([
|
console.log(commandLineUsage([
|
||||||
{
|
{
|
||||||
header: "Matrix Skype Puppet Bridge",
|
header: "Matrix Skype Puppet Bridge",
|
||||||
content: "A matrix puppet bridge for skype",
|
content: "A matrix puppet bridge for Skype",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
header: "Options",
|
header: "Options",
|
||||||
@ -117,7 +117,8 @@ async function run() {
|
|||||||
const retData = {
|
const retData = {
|
||||||
success: false,
|
success: false,
|
||||||
} as IRetData;
|
} as IRetData;
|
||||||
const [username, password] = str.split(" ");
|
const TOKENS_TO_EXTRACT = 2;
|
||||||
|
const [username, password] = str.split(/ (.+)/, TOKENS_TO_EXTRACT);
|
||||||
const data: any = {
|
const data: any = {
|
||||||
username,
|
username,
|
||||||
password,
|
password,
|
||||||
@ -128,7 +129,7 @@ async function run() {
|
|||||||
data.state = client.getState;
|
data.state = client.getState;
|
||||||
await client.disconnect();
|
await client.disconnect();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
log.verbose("Failed to log in as new user, perhaps the password is worng?");
|
log.verbose("Failed to log in as new user, perhaps the password is wrong?");
|
||||||
log.silly(err);
|
log.silly(err);
|
||||||
retData.error = "Username or password wrong";
|
retData.error = "Username or password wrong";
|
||||||
return retData;
|
return retData;
|
||||||
|
Loading…
Reference in New Issue
Block a user