@@ -83,7 +83,7 @@ public static ChatRoom createOneToOne(User user1, User user2) {
8383 ChatRoom room = new ChatRoom ();
8484 room .roomId = UUID .randomUUID ().toString ();
8585 room .type = ChatRoomType .ONE_TO_ONE ;
86- room .participantHash = generateParticipantHash (user1 .getUserId (), user2 .getUserId ());
86+ room .participantHash = generateParticipantHash (user1 .getId (), user2 .getId ());
8787 room .lastMessage = "" ;
8888
8989 // 참여자 추가 (양방향 연관관계 설정)
@@ -108,7 +108,7 @@ public static ChatRoom createGroup(List<User> users) {
108108 .roomId (UUID .randomUUID ().toString ())
109109 .type (ChatRoomType .GROUP )
110110 .participantHash (generateParticipantHash (users .stream ()
111- .map (User ::getUserId )
111+ .map (User ::getId )
112112 .toArray (Long []::new )))
113113 .lastMessage ("" )
114114 .build ();
@@ -138,7 +138,7 @@ public void updateLastMessage(String message) {
138138 */
139139 public void incrementUnreadCount (Long senderUserId ) {
140140 participants .stream ()
141- .filter (p -> !p .getUser ().getUserId ().equals (senderUserId ))
141+ .filter (p -> !p .getUser ().getId ().equals (senderUserId ))
142142 .forEach (ChatParticipant ::incrementUnreadCount );
143143 }
144144
@@ -165,7 +165,7 @@ private static void validateUsers(User user1, User user2) {
165165 if (user1 == null || user2 == null ) {
166166 throw new IllegalArgumentException ("사용자 정보는 필수입니다." );
167167 }
168- if (user1 .getUserId ().equals (user2 .getUserId ())) {
168+ if (user1 .getId ().equals (user2 .getId ())) {
169169 throw new IllegalArgumentException ("자기 자신과는 채팅방을 만들 수 없습니다." );
170170 }
171171 }
0 commit comments