diff --git a/index.js b/index.js index 9676fc1300dcff7aa732152f944a5e5c0f4d1ba7..2d40891f652e78a8f6efa693081ce67efbe6b19c 100644 --- a/index.js +++ b/index.js @@ -39,19 +39,24 @@ client.on('update', (msg) => { return; } - // This will be... not optimal I think. - if (following.has(acct)) { - console.log('ALREADY FOLLOWS: ' + acct); + // Don't follow locked accounts + if(msg.account.locked === true) { + console.log("LOCKED: " + acct); return; } - // Respect #nobot if (striptags(msg.account.note).match(/#nobot/i)) { client.mute_user(id); console.log("MUTED #nobot: " + acct); } + // This will be... not optimal I think. + if (following.has(acct)) { + console.log('ALREADY FOLLOWS: ' + acct); + return; + } + following.add(acct); client.follow(id); console.log("NOW FOLLOWS: " + acct);