diff options
| author | joonhoekim <26rote@gmail.com> | 2025-09-09 01:46:43 +0000 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-09-09 01:46:43 +0000 |
| commit | 345a1bfaa30b71ffc82828245408663d7edfd0d2 (patch) | |
| tree | bc42e28c09d321e635a8fea10381d61f45d2eb79 | |
| parent | 57d92a7e290490fdb8126fe8a7376a57dcfdcb40 (diff) | |
(김준회) 국제번호 발송시 수신처에 002 문자열 추가
| -rw-r--r-- | lib/users/auth/passwordUtil.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/users/auth/passwordUtil.ts b/lib/users/auth/passwordUtil.ts index 4d342a61..f9002240 100644 --- a/lib/users/auth/passwordUtil.ts +++ b/lib/users/auth/passwordUtil.ts @@ -423,12 +423,20 @@ async function sendSmsMessage(phoneNumber: string, message: string): Promise<boo if (countryInfo.country) { console.log(` Country: ${countryInfo.country}`); } + + // 국제 메시지인 경우 수신번호에 002 prefix 추가 + const isInternational = countryInfo.countryCode !== '82'; // 한국이 아닌 경우 + const toNumber = isInternational + ? `002${countryInfo.countryCode}${countryInfo.nationalNumber}` + : countryInfo.nationalNumber; + + console.log(` Final To Number: ${toNumber} (International: ${isInternational})`); const requestBody = { account: account, type: 'sms', from: fromNumber, - to: countryInfo.nationalNumber, + to: toNumber, country: countryInfo.countryCode, content: { sms: { |
