Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class FirebaseCloudMessageService : Logger {
Message.builder()
.setToken(message.token)
.setNotification(
Notification.builder().setTitle(TITLE).setBody(message.body).build(),
Notification.builder().setTitle(message.title).setBody(message.body).build(),
)
.setApnsConfig(getAPNSConfig())
.setAndroidConfig(getAndroidConfig())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class PushNotificationController(
taskId = request.taskId.toLong(),
body = request.body,
route = request.route,
title = request.title,
),
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ data class PushNotificationSendRequest(
val taskId: String,
val body: String,
val route: String,
val title: String = "SPURT",
)
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ data class FcmMessage(
val taskId: Long,
val body: String,
val route: String,
val title: String = "SPURT",
)
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class PushNotificationScheduler(
taskId = it.task.id,
body = it.message,
route = getRoute(it.order),
title = it.task.name,
)

fcmPushNotificationService.sendNotification(message)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ class TaskController(
val changedStatusTask = taskService.changeTaskStatus(taskId, member.id, taskStatusRequest.status)

// 몰입 상태가 되면 응원 문구 푸시 알림 요청
if (taskStatusRequest.status == TaskStatus.FOCUSED) {
if (changedStatusTask.status == TaskStatus.FOCUSED) {
taskService.requestSupportNotifications(taskId = taskId, memberId = member.id)
}

// 완료 상태가 되면 응원 문구 푸시 알림 비활성화
if (taskStatusRequest.status == TaskStatus.COMPLETE) {
if (changedStatusTask.status == TaskStatus.COMPLETE) {
taskService.inactiveSupportNotifications(taskId = taskId, memberId = member.id)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class OverdueTaskStatusUpdateScheduler(
taskId = checkNotNull(task.id, "task id"),
body =
"""
PPT 만들고 대본 작성 마감일이 끝났어요!
${task.name} 마감일이 끝났어요!
회고를 작성하며 과정을 돌아보세요.
""".trimIndent(),
route = "/retrospection",
Expand Down