라이브 취소 푸시 발송 로직 추가
This commit is contained in:
parent
d6dfa63bea
commit
896246d9ed
|
@ -19,6 +19,7 @@ class FcmEvent(
|
|||
val message: String,
|
||||
val container: String = "",
|
||||
val recipients: List<Long> = listOf(),
|
||||
val recipientsMap: Map<String, List<List<String>>>? = null,
|
||||
val isAuth: Boolean = false,
|
||||
val roomId: Long? = null,
|
||||
val contentId: Long? = null,
|
||||
|
@ -133,12 +134,9 @@ class FcmSendListener(
|
|||
}
|
||||
|
||||
FcmEventType.CANCEL_LIVE -> {
|
||||
if (fcmEvent.roomId != null) {
|
||||
val pushTokenList = memberRepository.getPushTokenFromReservationList(fcmEvent.roomId)
|
||||
|
||||
val iosPushTokens = pushTokenList["ios"]
|
||||
val aosPushToken = pushTokenList["aos"]
|
||||
|
||||
if (fcmEvent.recipientsMap != null) {
|
||||
val iosPushTokens = fcmEvent.recipientsMap["ios"]
|
||||
val aosPushToken = fcmEvent.recipientsMap["aos"]
|
||||
if (iosPushTokens != null) {
|
||||
for (tokens in iosPushTokens) {
|
||||
pushService.send(
|
||||
|
|
|
@ -474,6 +474,7 @@ class LiveRoomService(
|
|||
}
|
||||
}
|
||||
|
||||
val pushTokenListMap = memberRepository.getPushTokenFromReservationList(request.roomId)
|
||||
reservationRepository.cancelReservation(roomId = room.id!!)
|
||||
|
||||
applicationEventPublisher.publishEvent(
|
||||
|
@ -481,7 +482,7 @@ class LiveRoomService(
|
|||
type = FcmEventType.CANCEL_LIVE,
|
||||
title = room.member!!.nickname,
|
||||
message = "라이브 취소 : ${room.title}",
|
||||
roomId = request.roomId
|
||||
recipientsMap = pushTokenListMap
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue