Skip to content

Commit

Permalink
[#77] Fix currentUserName if meetingUser is null, use UserEntity
Browse files Browse the repository at this point in the history
  • Loading branch information
emost22 committed Mar 9, 2023
1 parent 71a00a2 commit 069e4b3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.promise8.wwwbe.model.v1.dto.res;

import com.promise8.wwwbe.model.v1.dto.PromiseDayOfWeek;
import com.promise8.wwwbe.service.MeetingServiceHelper;
import com.promise8.wwwbe.service.ThumbnailHelper;
import com.promise8.wwwbe.model.v1.dto.PromiseTime;
import com.promise8.wwwbe.model.v1.entity.MeetingEntityV1;
import com.promise8.wwwbe.model.v1.entity.MeetingStatusV1;
import com.promise8.wwwbe.model.v1.entity.MeetingUserEntityV1;
import com.promise8.wwwbe.model.v1.entity.UserEntityV1;
import com.promise8.wwwbe.service.MeetingServiceHelper;
import com.promise8.wwwbe.service.ThumbnailHelper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
Expand Down Expand Up @@ -101,7 +101,7 @@ public static MeetingGetResDtoV1 of(
.meetingName(meetingEntity.getMeetingName())
.minimumAlertMembers(meetingEntity.getConditionCount())
.hostName(confirmedPromiseResDto.getHostName())
.currentUserName(currentUserName)
.currentUserName(currentUserName == null ? userEntity.getUserName(): currentUserName)
.isHost(userEntity.getUserId().equals(meetingEntity.getCreator().getUserId()))
.joinedUserCount(isNoMeetingUser ? 0 : meetingEntity.getMeetingUserEntityList().size())
.votingUserCount(confirmedPromiseResDto.getVotingUserCount())
Expand Down

0 comments on commit 069e4b3

Please sign in to comment.