Skip to content

Commit

Permalink
Updated dependencies, fixed login errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel committed Oct 5, 2018
1 parent 9f2658d commit 309d605
Show file tree
Hide file tree
Showing 17 changed files with 611 additions and 799 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ phantomjs.exe
.test_*
.idea/
.sublime-project
*~
[._]*.un~

## Don't commit settings past default ones
.settings
6 changes: 3 additions & 3 deletions .settings
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"conversationsToLoad": 15,
"preventMessageFlicker": false,
"desktopNotifications": false,
"showTimestamps": false,
"showTimestamps": true,
"useCustomNicknames": true,
"timestampLocale": "en-US",
"timestampOptions": {},
"twoFactorAuth": false,
"headlessLogin": true,
"noSandbox": true,
"noSandbox": false,
"logonTimeout": 86400000
}
}
18 changes: 13 additions & 5 deletions cli.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
#!/usr/bin/env node

(function () {
const Login = require('./scripts/login.js');
const crypt = require('./scripts/crypt.js');
const Settings = require('./scripts/settings.js');
const Login = require('./lib/login.js');
const crypt = require('./lib/crypt.js');
const Settings = require('./lib/settings.js');
const colors = require('colors');

function executeCompleteLogin(callback, options) {
console.log('Facebook credentials:');
Login.execute(callback, options);
Login.execute(err => {
if (err) {
console.log(`Login verification failed: ${err}`);
console.log('Exiting. Please try again.'.red);
process.exit(1);
} else {
callback();
}
}, options);
}

function verifyLogon(callback) {
Expand Down Expand Up @@ -67,7 +75,7 @@

setTimeout(() => {
console.log('Launching app...'.cyan);
require('./scripts/interactive.js');
require('./lib/interactive.js');
}, delay);
});
}
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions scripts/interactive.js → lib/interactive.js
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const search = require('./search.js');
const Listeners = require('./listeners.js');
const heading = require('./heading.js');
const Settings = require('./settings.js');
const open = require('open');
const open = require('opn');

const colors = require('colors');
const safeColors = require('colors/safe');
Expand Down Expand Up @@ -391,7 +391,7 @@ InteractiveCli.prototype.handleCommands = function(command) {
open(url);
console.log('Attachment now open in browser');
} else {
console.log('Couldn\'t open attachement in browser');
console.log('Couldn\'t open attachment in browser');
}
rlInterface.prompt(true);
break;
Expand Down
File renamed without changes.
Loading

0 comments on commit 309d605

Please sign in to comment.