Skip to content

Commit

Permalink
feat: 룰렛 참여자 응답에 darakbangMemberId 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
ay-eonii committed Oct 23, 2024
1 parent a1f480a commit 94d4e7d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ public static ChatFindDetailResponse toResponse(ChatOwnership chatOwnership) {

private static ParticipantResponse getParticipantResponse(ChatOwnership chatOwnership) {
Author author = chatOwnership.getChat().getAuthor();
return new ParticipantResponse(author.getNickname(), author.getProfile());
return new ParticipantResponse(author.getDarakbangMemberId(), author.getNickname(), author.getProfile());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ public static ChatPreviewResponse toResponse(ChatPreview chatPreview) {

private static List<ParticipantResponse> getParticipants(ChatPreview chatPreview) {
return chatPreview.getParticipants().stream()
.map(participant -> new ParticipantResponse(participant.getNickname(), participant.getProfile(), participant.getRole()))
.map(participant -> new ParticipantResponse(
participant.getDarakbangMemberId(),
participant.getNickname(),
participant.getProfile(),
participant.getRole()))
.toList();
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package mouda.backend.chat.presentation.response;

public record ParticipantResponse(
long darakbangMemberId,
String nickname,
String profile,
String role
) {

public ParticipantResponse(String nickname, String profile) {
this(nickname, profile, null);
public ParticipantResponse(long darakbangMemberId, String nickname, String profile) {
this(darakbangMemberId, nickname, profile, null);
}
}

0 comments on commit 94d4e7d

Please sign in to comment.