1
0
mirror of https://github.com/fenwick67/mastofeed synced 2024-12-21 23:03:55 +01:00

add #noMastofeed

This commit is contained in:
fenwick67 2024-10-13 15:38:23 -04:00
parent 876ac87ebb
commit 1009742173

View File

@ -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;