A tool for parsing traffic on the jetstream and applying a moderation workstream based on regexp based rules

Update conditionals

+6 -3
+1 -1
src/checkPosts.ts
··· 51 51 (postCheck) => postCheck.label === label, 52 52 ); 53 53 54 - if (checkPost.language) { 54 + if (checkPost.language || checkPost.language === undefined) { 55 55 if (!checkPost?.language.includes(lang)) { 56 56 logger.info( 57 57 `[CHECKPOSTS]: ${checkPost!.label} not supported in ${lang}`,
+2 -2
src/checkProfiles.ts
··· 27 27 (profileCheck) => profileCheck.label === label, 28 28 ); 29 29 30 - if (checkProfiles.language) { 30 + if (checkProfiles.language || checkProfiles.language === undefined) { 31 31 if (!checkProfiles?.language.includes(lang)) { 32 32 logger.info( 33 33 `[CHECKDESCRIPTION]: ${checkProfiles!.label} not supported for ${lang}`, ··· 111 111 (profileCheck) => profileCheck.label === label, 112 112 ); 113 113 114 - if (checkProfiles.language) { 114 + if (checkProfiles.language || checkProfiles.language === undefined) { 115 115 if (!checkProfiles?.language.includes(lang)) { 116 116 logger.info( 117 117 `[CHECKDESCRIPTION]: ${checkProfiles!.label} not supported for ${lang}`,
+3
src/constants.ts.example
··· 10 10 11 11 export const PROFILE_CHECKS: Checks[] = [ 12 12 { 13 + language: ["eng"], 13 14 label: "skub", 14 15 comment: "Pro-skub language found in profile", 15 16 description: true, ··· 43 44 44 45 export const HANDLE_CHECKS: Checks[] = [ 45 46 { 47 + language: ["eng"], 46 48 label: "skub", 47 49 comment: "Pro-skub language found in handle", 48 50 reportAcct: false, ··· 57 59 58 60 export const POST_CHECKS: Checks[] = [ 59 61 { 62 + language: ["eng"], 60 63 label: "pro-skub-link", 61 64 comment: "Pro Skub link found in post", 62 65 reportAcct: false,