tangled
alpha
login
or
join now
skywatch.blue
/
skywatch-automod
7
fork
atom
A tool for parsing traffic on the jetstream and applying a moderation workstream based on regexp based rules
7
fork
atom
overview
issues
pulls
pipelines
Minor fixes
D. Scarnecchia
8 months ago
160fd560
3208af0c
+12
-11
3 changed files
expand all
collapse all
unified
split
src
checkPosts.ts
checkProfiles.ts
types.ts
+3
-4
src/checkPosts.ts
···
51
51
(postCheck) => postCheck.label === label,
52
52
);
53
53
54
54
-
if (checkPost.language || checkPost.language === undefined) {
54
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}`,
58
58
-
);
59
56
return;
57
57
+
} else {
58
58
+
logger.info(`[CHECKPOSTS]: ${checkPost!.label} supported for ${lang}`);
60
59
}
61
60
}
62
61
+8
-6
src/checkProfiles.ts
···
27
27
(profileCheck) => profileCheck.label === label,
28
28
);
29
29
30
30
-
if (checkProfiles.language || checkProfiles.language === undefined) {
30
30
+
if (checkProfiles?.language || checkProfiles?.language !== undefined) {
31
31
if (!checkProfiles?.language.includes(lang)) {
32
32
+
return;
33
33
+
} else {
32
34
logger.info(
33
33
-
`[CHECKDESCRIPTION]: ${checkProfiles!.label} not supported for ${lang}`,
35
35
+
`[CHECKDESCRIPTION]: ${checkProfiles!.label} supported for ${lang}`,
34
36
);
35
35
-
return;
36
37
}
37
38
}
38
39
···
111
112
(profileCheck) => profileCheck.label === label,
112
113
);
113
114
114
114
-
if (checkProfiles.language || checkProfiles.language === undefined) {
115
115
+
if (checkProfiles?.language || checkProfiles?.language !== undefined) {
115
116
if (!checkProfiles?.language.includes(lang)) {
117
117
+
return;
118
118
+
} else {
116
119
logger.info(
117
117
-
`[CHECKDESCRIPTION]: ${checkProfiles!.label} not supported for ${lang}`,
120
120
+
`[CHECKDESCRIPTION]: ${checkProfiles!.label} supported for ${lang}`,
118
121
);
119
119
-
return;
120
122
}
121
123
}
122
124
+1
-1
src/types.ts
···
1
1
export interface Checks {
2
2
-
language?: string;
2
2
+
language?: string[];
3
3
label: string;
4
4
comment: string;
5
5
description?: boolean;