Skip to content

Commit

Permalink
fix(push): push 요청에 notification 바디 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
jihwan2da committed Nov 23, 2023
1 parent 3c905a7 commit b863577
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions push/src/main/kotlin/gloddy/PushClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package gloddy

import com.google.firebase.messaging.FirebaseMessaging
import com.google.firebase.messaging.Message
import com.google.firebase.messaging.Notification
import org.springframework.stereotype.Component

@Component
Expand All @@ -11,6 +12,12 @@ class PushClient {
val message = Message.builder()
.putData("title", data.title)
.putData("content", data.content)
.setNotification(
Notification.builder()
.setTitle(data.title)
.setBody(data.content)
.build()
)
.putAllData(data.payload)
.setToken(data.token)
.build()
Expand Down

0 comments on commit b863577

Please sign in to comment.