mirror of
https://github.com/fenwick67/mastofeed
synced 2024-12-22 07:16:14 +01:00
add #noMastofeed
This commit is contained in:
parent
876ac87ebb
commit
1009742173
@ -77,10 +77,10 @@ module.exports = async function (opts) {
|
|||||||
|
|
||||||
function userNobot(user){
|
function userNobot(user){
|
||||||
let lowerSummary = (user.summary||"").toLowerCase();
|
let lowerSummary = (user.summary||"").toLowerCase();
|
||||||
let nobot = lowerSummary.indexOf('nobot') > -1;
|
let nobot = lowerSummary.indexOf('nobot') > -1 || lowerSummary.indexOf('nomastofeed') > -1;
|
||||||
let yesmastofeed = lowerSummary.indexOf('mastofeed') > -1 || lowerSummary.indexOf('yesmastofeed') > -1;
|
let yesmastofeed = lowerSummary.indexOf('mastofeed') > -1 || lowerSummary.indexOf('yesmastofeed') > -1;
|
||||||
if (Array.isArray(user.tag)){
|
if (Array.isArray(user.tag)){
|
||||||
let nobotTag = !!user.tag.find(t=>t.name&&t.name.toLowerCase()=="#nobot");
|
let nobotTag = !!user.tag.find(t=>t.name&&( t.name.toLowerCase()=="#nobot" || t.name.toLowerCase()=="#nomastofeed" ));
|
||||||
let yesmastofeedTag = !!user.tag.find(t=>t.name&&(t.name.toLowerCase()=="#yesmastofeed" || t.name.toLowerCase()=="#mastofeed"));
|
let yesmastofeedTag = !!user.tag.find(t=>t.name&&(t.name.toLowerCase()=="#yesmastofeed" || t.name.toLowerCase()=="#mastofeed"));
|
||||||
nobot |= nobotTag;
|
nobot |= nobotTag;
|
||||||
yesmastofeed |= yesmastofeedTag;
|
yesmastofeed |= yesmastofeedTag;
|
||||||
|
Loading…
Reference in New Issue
Block a user