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