diff --git a/push/src/main/kotlin/gloddy/PushClient.kt b/push/src/main/kotlin/gloddy/PushClient.kt index f25221e..0c6a3d6 100644 --- a/push/src/main/kotlin/gloddy/PushClient.kt +++ b/push/src/main/kotlin/gloddy/PushClient.kt @@ -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 @@ -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()