Skip to content

Commit

Permalink
Update MessageService.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee-DoHa committed Nov 27, 2022
1 parent ad3318d commit 797fe08
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ public List<MessageListResponse> getMessageFeed(Long cursor, Pageable pageable,
f.setIsCorrect(f.getBody().containsAll(markingRepository.findByMessageId(f.getMessageId()).orElseThrow().getBody()));
}

if (f.getBody().size() > 1) {
f.setHaveSecondLine(true);
} else {
f.setHaveSecondLine(false);
}

f.setBody(Collections.singletonList(f.getBody().get(0).length() > 20 ? initialList(f.getBody().get(0)).substring(0, 20) : initialList(f.getBody().get(0))));
f.setHaveNextMessage(!messageRepository.mainFeedLess(memberToken, f.getMessageId(), pageable).isEmpty());

Expand Down

0 comments on commit 797fe08

Please sign in to comment.