···5151 (postCheck) => postCheck.label === label,
5252 );
53535454- if (!langs.includes(lang)) {
5555- return;
5454+ if (checkPost?.language || checkPost?.language !== undefined) {
5555+ if (!checkPost?.language.includes(lang)) {
5656+ return;
5757+ }
5658 }
57595860 if (checkPost?.ignoredDIDs) {
+12-8
src/checkProfiles.ts
···1616) => {
1717 const lang = await getLanguage(description);
18181919- if (!langs.includes(lang)) {
2020- return;
2121- }
2222-2319 const labels: string[] = Array.from(
2420 PROFILE_CHECKS,
2521 (profileCheck) => profileCheck.label,
···3026 const checkProfiles = PROFILE_CHECKS.find(
3127 (profileCheck) => profileCheck.label === label,
3228 );
2929+3030+ if (checkProfiles?.language || checkProfiles?.language !== undefined) {
3131+ if (!checkProfiles?.language.includes(lang)) {
3232+ return;
3333+ }
3434+ }
33353436 // Check if DID is whitelisted
3537 if (checkProfiles?.ignoredDIDs) {
···9496) => {
9597 const lang = await getLanguage(description);
96989797- if (!langs.includes(lang)) {
9898- return;
9999- }
100100-10199 // Get a list of labels
102100 const labels: string[] = Array.from(
103101 PROFILE_CHECKS,
···109107 const checkProfiles = PROFILE_CHECKS.find(
110108 (profileCheck) => profileCheck.label === label,
111109 );
110110+111111+ if (checkProfiles?.language || checkProfiles?.language !== undefined) {
112112+ if (!checkProfiles?.language.includes(lang)) {
113113+ return;
114114+ }
115115+ }
112116113117 // Check if DID is whitelisted
114118 if (checkProfiles?.ignoredDIDs) {
+4
src/constants.ts.example
···10101111export const PROFILE_CHECKS: Checks[] = [
1212 {
1313+ language: ["eng"],
1314 label: "skub",
1415 comment: "Pro-skub language found in profile",
1516 description: true,
···43444445export const HANDLE_CHECKS: Checks[] = [
4546 {
4747+ language: ["eng"],
4648 label: "skub",
4749 comment: "Pro-skub language found in handle",
4850 reportAcct: false,
···57595860export const POST_CHECKS: Checks[] = [
5961 {
6262+ language: ["eng"],
6063 label: "pro-skub-link",
6164 comment: "Pro Skub link found in post",
6265 reportAcct: false,
6366 commentAcct: true,
6767+ reportPost: false,
6468 toLabel: true,
6569 check: new RegExp(
6670 "skubbe\\.com|skub\\.(me|pro|tech)",
+3-1
src/developing_checks.md
···88```typescript
99export const HANDLE_CHECKS: Checks[] = [
1010 {
1111+ language: "[eng]", // Language of the check. If the check language does not match the content language, the check will be skipped. Assign null or remove field to apply to all languages.
1112 label: "example",
1213 comment: "Example found in handle",
1314 description: true, // Optional, only used in handle checks
1415 displayName: true, // Optional, only used in handle checks
1515- reportAcct: false, // it true, the check will only report the content against the account, not label.
1616+ reportAcct: false, // if true, the check will only report the content against the account, not label.
1717+ reportPost: false, // if true, the check will only report the content against the post, not label. Only used in post checks.
1618 commentOnly: false, // if true, will generate an account level comment from flagged posts, rather than a report. Intended for use when reportAcct is false, and on posts only where the flag may generate a high volume of reports.
1719 toLabel: true, // Should the handle in question be labeled if check evaluates to true.
1820 check: new RegExp("example", "i"), // Regular expression to match against the content