This commit is contained in:
lunaticbum 2026-05-06 17:21:45 +09:00
parent 5c00152de9
commit 6f98b0fde4

View File

@ -156,11 +156,11 @@ object NewsService {
val command = if (isWindows) { val command = if (isWindows) {
// 윈도우용: 큰따옴표 이스케이프에 주의해야 합니다. // 윈도우용: 큰따옴표 이스케이프에 주의해야 합니다.
val jsonBody = "{\"id\":\"$chatId\",\"message\":\"$message\"}" val jsonBody = "{\"id\":\"$chatId\",\"message\":\"$encodedMessage\"}"
listOf("cmd", "/c", "curl -s -X POST $url -H \"Content-Type: application/json\" -d \"$jsonBody\"") listOf("cmd", "/c", "curl -s -X POST $url -H \"Content-Type: application/json\" -d \"$jsonBody\"")
} else { } else {
// 맥/리눅스용: 홑따옴표를 사용하여 JSON 구조를 보호합니다. // 맥/리눅스용: 홑따옴표를 사용하여 JSON 구조를 보호합니다.
val jsonBody = "{\"id\":\"$chatId\",\"message\":\"$message\"}" val jsonBody = "{\"id\":\"$chatId\",\"message\":\"$encodedMessage\"}"
listOf("curl", "-s", "-X", "POST", url, "-H", "Content-Type: application/json", "-d", jsonBody) listOf("curl", "-s", "-X", "POST", url, "-H", "Content-Type: application/json", "-d", jsonBody)
} }