Skip to content

Commit

Permalink
fix: 관리자 정보 추가 조회 조건식 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
psychology50 committed Nov 5, 2024
1 parent c249a3e commit 8d5dbb1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public ChatRoomRes.RoomWithParticipants execute(Long userId, Long chatRoomId) {
);

// 내가 관리자가 아니거나, 최근 활동자에 관리자가 없다면 관리자 정보 조회
if (!myInfo.getRole().equals(ChatMemberRole.ADMIN) || recentParticipants.stream().noneMatch(participant -> participant.role().equals(ChatMemberRole.ADMIN))) {
if (!myInfo.getRole().equals(ChatMemberRole.ADMIN) && recentParticipants.stream().noneMatch(participant -> participant.role().equals(ChatMemberRole.ADMIN))) {
ChatMemberResult.Detail admin = chatMemberService.readAdmin(chatRoomId)
.orElseThrow(() -> new ChatMemberErrorException(ChatMemberErrorCode.NOT_FOUND));
recentParticipantIds.add(admin.userId());
Expand Down

0 comments on commit 8d5dbb1

Please sign in to comment.