fix(chat): 외부 채팅 API 요청에 username을 전달한다
This commit is contained in:
@@ -672,7 +672,7 @@ class ChatRoomService(
|
||||
)
|
||||
|
||||
// 6) 외부 API 호출 (최대 3회 재시도)
|
||||
val characterReply = callExternalApiForChatSendWithRetry(userId, characterUUID, message, sessionId)
|
||||
val characterReply = callExternalApiForChatSendWithRetry(userId, member.nickname, characterUUID, message, sessionId)
|
||||
|
||||
// 6) 내 메시지 저장
|
||||
val myMsgEntity = ChatMessage(
|
||||
@@ -827,6 +827,7 @@ class ChatRoomService(
|
||||
|
||||
private fun callExternalApiForChatSendWithRetry(
|
||||
userId: String,
|
||||
username: String,
|
||||
characterUUID: String,
|
||||
message: String,
|
||||
sessionId: String
|
||||
@@ -836,7 +837,7 @@ class ChatRoomService(
|
||||
while (attempt < maxAttempts) {
|
||||
attempt++
|
||||
try {
|
||||
return callExternalApiForChatSend(userId, characterUUID, message, sessionId)
|
||||
return callExternalApiForChatSend(userId, username, characterUUID, message, sessionId)
|
||||
} catch (e: Exception) {
|
||||
log.warn("[chat] 외부 채팅 전송 실패 attempt={}, error={}", attempt, e.message)
|
||||
}
|
||||
@@ -847,6 +848,7 @@ class ChatRoomService(
|
||||
|
||||
private fun callExternalApiForChatSend(
|
||||
userId: String,
|
||||
username: String,
|
||||
characterUUID: String,
|
||||
message: String,
|
||||
sessionId: String
|
||||
@@ -863,6 +865,7 @@ class ChatRoomService(
|
||||
|
||||
val requestBody = mapOf(
|
||||
"userId" to userId,
|
||||
"username" to username,
|
||||
"characterId" to characterUUID,
|
||||
"message" to message,
|
||||
"sessionId" to sessionId
|
||||
|
||||
Reference in New Issue
Block a user