summaryrefslogtreecommitdiff
path: root/lib/users/auth/passwordUtil.ts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/users/auth/passwordUtil.ts')
-rw-r--r--lib/users/auth/passwordUtil.ts10
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: {