Skip to content

Commit 3659446

Browse files
committed
fix: concatenation of banned keywords in PostService
1 parent ed91719 commit 3659446

File tree

1 file changed

+3
-3
lines changed
  • packages/velog-cron/src/services/PostService

1 file changed

+3
-3
lines changed

packages/velog-cron/src/services/PostService/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ export class PostService implements Service {
252252
})
253253

254254
if (checkKeyword) {
255-
return { isSpam: true, reason: `bannedKeyword: `.concat(...usedBannedKeywords) }
255+
return { isSpam: true, reason: `bannedKeyword: `.concat(...usedBannedKeywords.join(',')) }
256256
}
257257

258258
const bannedAltKeywords = await this.db.dynamicConfigItem.findMany({
@@ -289,7 +289,7 @@ export class PostService implements Service {
289289
if (score >= 2 && isForeign) {
290290
return {
291291
isSpam: true,
292-
reason: `initScore: ${initScore}, foreign, ${'BannedAltKeywords: '.concat(
292+
reason: `initScore: ${initScore}, foreign, ${'bannedAltKeywords: '.concat(
293293
usedBannedAltKeywords.join(','),
294294
)}`,
295295
}
@@ -298,7 +298,7 @@ export class PostService implements Service {
298298
if (score >= 3) {
299299
return {
300300
isSpam: true,
301-
reason: `initScore: ${initScore}, foreign, ${'BannedAltKeywords: '.concat(
301+
reason: `initScore: ${initScore}, foreign, ${'bannedAltKeywords: '.concat(
302302
usedBannedAltKeywords.join(','),
303303
)}`,
304304
}

0 commit comments

Comments
 (0)