Skip to content

Commit

Permalink
fix: 좋아요 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
nohy6630 committed Apr 14, 2024
1 parent 22b91e4 commit 7021589
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void delete(Long conversationId) {

private boolean checkLike(Member member, Conversation conversation) {
for (ConversationLike conversationLike : conversation.getLikes()) {
if (conversationLike.getMember().equals(member)) {
if (conversationLike.getMember().getId().equals(member.getId())) {
return true;
}
}
Expand All @@ -91,14 +91,14 @@ public GetConversationResponse get(Long conversationId) {
childs.add(GetConversationResponse.of(
child,
checkLike(member, child),
member.equals(child.getMember()),
member.getId().equals(child.getMember().getId()),
new ArrayList<>()
));
}
return GetConversationResponse.of(
conversation,
checkLike(member, conversation),
member.equals(conversation.getMember()),
member.getId().equals(conversation.getMember().getId()),
childs);
}

Expand All @@ -111,7 +111,7 @@ public GetConversationResponse getExceptChild(Long conversationId) {
return GetConversationResponse.of(
conversation,
checkLike(member, conversation),
member.equals(conversation.getMember()),
member.getId().equals(conversation.getMember().getId()),
new ArrayList<>());
}

Expand Down

0 comments on commit 7021589

Please sign in to comment.