@joliegg/moderation 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -153,7 +153,7 @@ class ModerationClient {
|
|
|
153
153
|
async moderateLink(url, allowShorteners = false) {
|
|
154
154
|
try {
|
|
155
155
|
const domain = new URL(url).hostname;
|
|
156
|
-
const blacklisted = this.urlBlackList?.some(u =>
|
|
156
|
+
const blacklisted = this.urlBlackList?.some(u => url.indexOf(u) > -1);
|
|
157
157
|
if (blacklisted) {
|
|
158
158
|
return { source: url, moderation: [{ category: 'CUSTOM_BLACK_LIST', confidence: 100 }] };
|
|
159
159
|
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -190,7 +190,7 @@ class ModerationClient {
|
|
|
190
190
|
try {
|
|
191
191
|
const domain = new URL(url).hostname;
|
|
192
192
|
|
|
193
|
-
const blacklisted = this.urlBlackList?.some(u =>
|
|
193
|
+
const blacklisted = this.urlBlackList?.some(u => url.indexOf(u) > -1);
|
|
194
194
|
|
|
195
195
|
if (blacklisted) {
|
|
196
196
|
return { source: url, moderation: [{ category: 'CUSTOM_BLACK_LIST', confidence: 100 }] };
|