라이브 정보 - 필요없는 부분 제거

This commit is contained in:
Klaus 2023-08-14 22:49:41 +09:00
parent ba69f86295
commit c84a9bc473
2 changed files with 9 additions and 17 deletions

View File

@ -630,11 +630,7 @@ class LiveRoomService(
expireTimestamp.toInt() expireTimestamp.toInt()
) )
val tags = room.tags.asSequence().filter { it.tag.isActive }.map { it.tag.tag }.toList() val isFollowing = explorerQueryRepository
val isRadioMode = tags.contains("라디오") or tags.contains("콘서트")
val isAvailableDonation = room.member!!.id!! != member.id!! &&
room.member!!.role == MemberRole.CREATOR
val isFollowingManager = explorerQueryRepository
.getNotificationUserIds(room.member!!.id!!) .getNotificationUserIds(room.member!!.id!!)
.contains(member.id) .contains(member.id)
@ -668,22 +664,20 @@ class LiveRoomService(
channelName = room.channelName!!, channelName = room.channelName!!,
rtcToken = rtcToken, rtcToken = rtcToken,
rtmToken = rtmToken, rtmToken = rtmToken,
managerId = room.member!!.id!!, creatorId = room.member!!.id!!,
managerNickname = room.member!!.nickname, creatorNickname = room.member!!.nickname,
managerProfileUrl = if (room.member!!.profileImage != null) { creatorProfileUrl = if (room.member!!.profileImage != null) {
"$cloudFrontHost/${room.member!!.profileImage}" "$cloudFrontHost/${room.member!!.profileImage}"
} else { } else {
"$cloudFrontHost/profile/default-profile.png" "$cloudFrontHost/profile/default-profile.png"
}, },
isFollowingManager = isFollowingManager, isFollowing = isFollowing,
participantsCount = roomInfo.listenerCount + roomInfo.speakerCount + roomInfo.managerCount, participantsCount = roomInfo.listenerCount + roomInfo.speakerCount + roomInfo.managerCount,
totalAvailableParticipantsCount = room.numberOfPeople, totalAvailableParticipantsCount = room.numberOfPeople,
speakerList = roomInfo.speakerList, speakerList = roomInfo.speakerList,
listenerList = roomInfo.listenerList, listenerList = roomInfo.listenerList,
managerList = roomInfo.managerList, managerList = roomInfo.managerList,
donationRankingTop3UserIds = donationRankingTop3UserIds, donationRankingTop3UserIds = donationRankingTop3UserIds,
isRadioMode = isRadioMode,
isAvailableDonation = isAvailableDonation,
isPrivateRoom = room.type == LiveRoomType.PRIVATE, isPrivateRoom = room.type == LiveRoomType.PRIVATE,
password = room.password password = room.password
) )

View File

@ -8,18 +8,16 @@ data class GetRoomInfoResponse(
val channelName: String, val channelName: String,
val rtcToken: String, val rtcToken: String,
val rtmToken: String, val rtmToken: String,
val managerId: Long, val creatorId: Long,
val managerNickname: String, val creatorNickname: String,
val managerProfileUrl: String, val creatorProfileUrl: String,
val isFollowingManager: Boolean, val isFollowing: Boolean,
val participantsCount: Int, val participantsCount: Int,
val totalAvailableParticipantsCount: Int, val totalAvailableParticipantsCount: Int,
val speakerList: List<LiveRoomMember>, val speakerList: List<LiveRoomMember>,
val listenerList: List<LiveRoomMember>, val listenerList: List<LiveRoomMember>,
val managerList: List<LiveRoomMember>, val managerList: List<LiveRoomMember>,
val donationRankingTop3UserIds: List<Long>, val donationRankingTop3UserIds: List<Long>,
val isRadioMode: Boolean = false,
val isAvailableDonation: Boolean = false,
val isPrivateRoom: Boolean = false, val isPrivateRoom: Boolean = false,
val password: String? = null val password: String? = null
) )