Skip to content

Commit

Permalink
added error message to extended send push result (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
oyakovlev authored May 22, 2024
1 parent cc1b815 commit 288f5ea
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repositories {
}

// Append dependency
implementation("com.icerockdev.service:fcm-push-service:2.1.0")
implementation("com.icerockdev.service:fcm-push-service:2.1.1")
````

## Koin configure
Expand Down
2 changes: 1 addition & 1 deletion fcm-push-service/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import kotlin.text.String
*/

group = "com.icerockdev.service"
version = "2.1.0"
version = "2.1.1"

plugins {
id("org.jetbrains.kotlin.jvm")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package com.icerockdev.service.fcmpush

data class PushSendResult(val token: String, val isSuccess: Boolean)
data class PushSendResult(val token: String, val isSuccess: Boolean, val errorMessage: String? = null)
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ class PushService(
pushSendResultList.addAll(tokenList.map { token ->
PushSendResult(
token = token,
isSuccess = false
isSuccess = false,
errorMessage = "Internal error"
)
})
return@forEach
Expand All @@ -66,7 +67,8 @@ class PushService(
pushSendResultList.add(
PushSendResult(
token = tokenList[index],
isSuccess = message.isSuccessful
isSuccess = message.isSuccessful,
errorMessage = message.exception?.message
)
)
}
Expand Down

0 comments on commit 288f5ea

Please sign in to comment.