Compare commits
3 Commits
2410d77cb7
...
82a6161abf
Author | SHA1 | Date |
---|---|---|
|
82a6161abf | |
|
077af3a46d | |
|
498d9c4893 |
|
@ -21,38 +21,40 @@ class FcmService {
|
|||
messageId: Long? = null,
|
||||
contentId: Long? = null
|
||||
) {
|
||||
val multicastMessage = MulticastMessage.builder()
|
||||
.addAllTokens(tokens)
|
||||
if (tokens.isNotEmpty()) {
|
||||
logger.info("os: $container")
|
||||
val multicastMessage = MulticastMessage.builder()
|
||||
.addAllTokens(tokens)
|
||||
|
||||
if (container == "ios") {
|
||||
multicastMessage
|
||||
.setNotification(
|
||||
Notification.builder()
|
||||
.setTitle(title)
|
||||
.setBody(message)
|
||||
.build()
|
||||
)
|
||||
} else {
|
||||
multicastMessage
|
||||
.putData("title", title)
|
||||
.putData("message", message)
|
||||
if (container == "ios") {
|
||||
multicastMessage
|
||||
.setNotification(
|
||||
Notification.builder()
|
||||
.setTitle(title)
|
||||
.setBody(message)
|
||||
.build()
|
||||
)
|
||||
} else {
|
||||
multicastMessage
|
||||
.putData("title", title)
|
||||
.putData("message", message)
|
||||
}
|
||||
|
||||
if (roomId != null) {
|
||||
multicastMessage.putData("room_id", roomId.toString())
|
||||
}
|
||||
|
||||
if (messageId != null) {
|
||||
multicastMessage.putData("message_id", messageId.toString())
|
||||
}
|
||||
|
||||
if (contentId != null) {
|
||||
multicastMessage.putData("content_id", contentId.toString())
|
||||
}
|
||||
|
||||
val response = FirebaseMessaging.getInstance().sendEachForMulticast(multicastMessage.build())
|
||||
logger.info("보내기 성공: ${response.successCount}")
|
||||
logger.info("보내기 실패: ${response.failureCount}")
|
||||
}
|
||||
|
||||
if (roomId != null) {
|
||||
multicastMessage.putData("room_id", roomId.toString())
|
||||
}
|
||||
|
||||
if (messageId != null) {
|
||||
multicastMessage.putData("message_id", messageId.toString())
|
||||
}
|
||||
|
||||
if (contentId != null) {
|
||||
multicastMessage.putData("content_id", contentId.toString())
|
||||
}
|
||||
|
||||
val response = FirebaseMessaging.getInstance().sendEachForMulticast(multicastMessage.build())
|
||||
logger.info("os: $container")
|
||||
logger.info("보내기 성공: ${response.successCount}")
|
||||
logger.info("보내기 실패: ${response.failureCount}")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -301,6 +301,7 @@ class LiveRoomService(
|
|||
channelName = room.channelName,
|
||||
beginDateTime = beginDateTime.format(DateTimeFormatter.ofPattern("yyyy.MM.dd E hh:mm a")),
|
||||
isPaid = false,
|
||||
isAdult = room.isAdult,
|
||||
isPrivateRoom = room.type == LiveRoomType.PRIVATE,
|
||||
password = room.password
|
||||
)
|
||||
|
|
|
@ -9,6 +9,7 @@ data class GetRoomDetailResponse(
|
|||
val title: String,
|
||||
val notice: String,
|
||||
var isPaid: Boolean,
|
||||
val isAdult: Boolean,
|
||||
val isPrivateRoom: Boolean,
|
||||
val password: String?,
|
||||
val tags: List<String>,
|
||||
|
|
|
@ -80,6 +80,7 @@ class MemberQueryRepositoryImpl(
|
|||
var where = member.isActive.isTrue
|
||||
.and(member.email.notIn("admin@sodalive.net"))
|
||||
.and(member.container.eq(container))
|
||||
.and(member.pushToken.isNotNull)
|
||||
|
||||
if (isAuth) {
|
||||
where = where.and(member.auth.isNotNull)
|
||||
|
@ -113,6 +114,7 @@ class MemberQueryRepositoryImpl(
|
|||
blockMemberRepository.getBlockedMemberList(creatorId)
|
||||
)
|
||||
)
|
||||
.and(creatorFollowing.member.pushToken.isNotNull)
|
||||
|
||||
if (isAuth) {
|
||||
where = where.and(member.auth.isNotNull)
|
||||
|
@ -149,6 +151,7 @@ class MemberQueryRepositoryImpl(
|
|||
blockMemberRepository.getBlockedMemberList(creatorId)
|
||||
)
|
||||
)
|
||||
.and(creatorFollowing.member.pushToken.isNotNull)
|
||||
|
||||
if (isAuth) {
|
||||
where = where.and(member.auth.isNotNull)
|
||||
|
@ -177,7 +180,10 @@ class MemberQueryRepositoryImpl(
|
|||
)
|
||||
.from(message)
|
||||
.innerJoin(message.recipient, member)
|
||||
.where(message.id.eq(messageId))
|
||||
.where(
|
||||
message.id.eq(messageId)
|
||||
.and(member.pushToken.isNotNull)
|
||||
)
|
||||
.fetchFirst()
|
||||
}
|
||||
|
||||
|
@ -188,6 +194,7 @@ class MemberQueryRepositoryImpl(
|
|||
var where = member.isActive.isTrue
|
||||
.and(member.email.notIn("admin@sodalive.net"))
|
||||
.and(member.id.`in`(*recipients.toTypedArray()))
|
||||
.and(member.pushToken.isNotNull)
|
||||
|
||||
if (isAuth) {
|
||||
where = where.and(member.auth.isNotNull)
|
||||
|
|
Loading…
Reference in New Issue