Skip to content

Commit

Permalink
[fix/#114] 알림 파싱 오류 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
blueme0 committed Jan 30, 2024
1 parent 783e963 commit 6769db9
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class TeumMessagingService : FirebaseMessagingService() {
dataStore.deviceToken = token

if (dataStore.userToken != "") {
Timber.tag("teum-http").d("teumMessagingService")
GlobalScope.launch {
kotlin.runCatching {
userService.patchDeviceToken(
Expand All @@ -54,7 +53,7 @@ class TeumMessagingService : FirebaseMessagingService() {
super.onMessageReceived(message)

if (dataStore.isLogin) {
if (message.data.isNotEmpty()) {
if (message.data.isNotEmpty() && message.data["title"].toString() != EMPTY) {
sendNotificationAlarm(
Message(message.data["title"].toString(), message.data["content"].toString())
)
Expand Down Expand Up @@ -93,5 +92,9 @@ class TeumMessagingService : FirebaseMessagingService() {
}
}

private data class Message(val title: String, val body: String)
companion object {
const val EMPTY = "null"
}

private data class Message(var title: String, var body: String)
}

0 comments on commit 6769db9

Please sign in to comment.