Skip to content

Commit

Permalink
fix #145: Receiver 안 들어오는 문제 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
devbattery committed Oct 5, 2023
1 parent b82a2de commit 26f29fa
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 26f29fa

Please sign in to comment.