Skip to content

Commit 4e096bd

Browse files
committed
[BE] fix: 수정시 기존id 그대로 사용하도록 변경 (#124)
1 parent a45b96a commit 4e096bd

File tree

1 file changed

+2
-2
lines changed
  • src/backend/chat-server/src/main/kotlin/com/asyncgate/chat_server/domain

1 file changed

+2
-2
lines changed

src/backend/chat-server/src/main/kotlin/com/asyncgate/chat_server/domain/DirectMessage.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ class DirectMessage(
7474

7575
/**
7676
* 현재 메시지를 수정하여, 새로운 메시지(수정본)를 생성.
77-
* 새로운 메시지에는 새 ID가 부여되고, type은 EDIT로 변경됨.
77+
* 새로운 메시지 type은 EDIT로 변경됨.
7878
*/
7979
fun withEdit(newName: String, newContent: String): DirectMessage {
8080
return DirectMessage(
81-
id = IdGenerator.generate(), // 새 ID 부여
81+
id = this.id,
8282
channelId = this.channelId,
8383
userId = this.userId,
8484
type = DirectMessageType.EDIT,

0 commit comments

Comments
 (0)