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

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

View File

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