Skip to content

Commit

Permalink
Merge pull request #169 from masters2023-4th-project-carrot-talk/dev
Browse files Browse the repository at this point in the history
[be] Receiver 안 들어오는 문제 수정
  • Loading branch information
devbattery authored Oct 5, 2023
2 parents fde60a3 + 26f29fa commit 6db89ce
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 6db89ce

Please sign in to comment.