From 26f29facd55de24148bab156b4e82079fc28b80a Mon Sep 17 00:00:00 2001 From: Sully <2dcoder@naver.com> Date: Thu, 5 Oct 2023 17:18:28 +0900 Subject: [PATCH] =?UTF-8?q?fix=20#145:=20Receiver=20=EC=95=88=20=EB=93=A4?= =?UTF-8?q?=EC=96=B4=EC=98=A4=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/example/carrot/chat_room/entity/ChatRoom.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/be/carrot/src/main/java/com/example/carrot/chat_room/entity/ChatRoom.java b/be/carrot/src/main/java/com/example/carrot/chat_room/entity/ChatRoom.java index 02bee2b5b..0186cbc89 100644 --- a/be/carrot/src/main/java/com/example/carrot/chat_room/entity/ChatRoom.java +++ b/be/carrot/src/main/java/com/example/carrot/chat_room/entity/ChatRoom.java @@ -23,8 +23,10 @@ import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; +import lombok.extern.slf4j.Slf4j; @Entity +@Slf4j @NoArgsConstructor(access = AccessLevel.PROTECTED) @Getter public class ChatRoom extends BaseCreatedTimeEntity implements Serializable { @@ -59,7 +61,8 @@ public static ChatRoom create(User user, Product product) { public User getReceiver(User sender) { User seller = product.getUser(); - if (seller == sender) { + if (seller.getUserId().equals(sender.getUserId())) { + log.info("getReceiver -> receiver 들어옴!"); return this.user; }