Skip to content

Commit a87c50e

Browse files
committed
add: 'UG' to blockList in PostService
1 parent 6139ceb commit a87c50e

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export class PostService implements Service {
146146
country: string,
147147
): Promise<{ isSpam: boolean; reason: string; targetType?: string }> {
148148
const allowList = ['KR', 'GB', '']
149-
const blockList = ['IN', 'PK', 'CN', 'VN', 'TH', 'PH']
149+
const blockList = ['IN', 'PK', 'CN', 'VN', 'TH', 'PH', 'UG']
150150
const isForeign = !allowList.includes(country)
151151

152152
if (blockList.includes(country)) {
@@ -201,7 +201,7 @@ export class PostService implements Service {
201201

202202
const containsPhoneNumber = phoneRegex.some((regex) => regex.test(replaced))
203203

204-
if (containsPhoneNumber) {
204+
if (containsPhoneNumber && isForeign) {
205205
return { isSpam: true, reason: 'containsPhoneNumber' }
206206
}
207207

0 commit comments

Comments
 (0)