Skip to content

Commit 60552d7

Browse files
committed
upgrade firebase version to fix send multicast bug
1 parent 48024e3 commit 60552d7

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ThisBuild / organization := "app.softnetwork"
22

33
name := "notification"
44

5-
ThisBuild / version := "0.6.5"
5+
ThisBuild / version := "0.7.0"
66

77
ThisBuild / scalaVersion := "2.12.18"
88

common/build.sbt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@ libraryDependencies ++= Seq(
1313
"org.apache.commons" % "commons-email" % "1.5",
1414
"com.google.auth" % "google-auth-library-oauth2-http" % "0.20.0" excludeAll guavaExclusion,
1515
"io.opencensus" % "opencensus-contrib-http-util" % "0.24.0" excludeAll(guavaExclusion, ExclusionRule(organization = "io.grpc", name="grpc-context")),
16-
"com.google.firebase" % "firebase-admin" % "8.2.0" excludeAll(ExclusionRule(organization = "io.opencensus", name="opencensus-contrib-http-util"), ExclusionRule(organization = "com.google.auth", name = "google-auth-library-oauth2-http")/*, ExclusionRule(organization = "org.apache.commons", name = "commons-lang3")*/, ExclusionRule(organization = "io.netty")),
16+
"com.google.firebase" % "firebase-admin" % "9.3.0" excludeAll(
17+
ExclusionRule(organization = "io.opencensus", name="opencensus-contrib-http-util"),
18+
ExclusionRule(organization = "com.google.auth", name = "google-auth-library-oauth2-http")
19+
/*, ExclusionRule(organization = "org.apache.commons", name = "commons-lang3")*/,
20+
ExclusionRule(organization = "io.netty"),
21+
ExclusionRule(organization = "io.grpc")
22+
),
1723
"com.eatthepath" % "pushy" % "0.15.1"
1824
)
1925

core/src/main/scala/app/softnetwork/notification/spi/FcmProvider.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ trait FcmProvider extends AndroidProvider with PushSettings {
104104

105105
val results: Seq[NotificationStatusResult] =
106106
Try(
107-
messaging.sendMulticast(payload)
107+
messaging.sendEachForMulticast(payload)
108108
) match {
109109
case Success(s) =>
110110
val results: Seq[NotificationStatusResult] = s

testkit/src/main/scala/com/google/firebase/messaging/MockFirebaseMessagingClient.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
package com.google.firebase.messaging
22

3+
import app.softnetwork.persistence.generateUUID
4+
35
import java.util
46

57
trait MockFirebaseMessagingClient extends FirebaseMessagingClient {
68
def messageId: Option[String] = None
79

810
def batchResponse: Option[BatchResponse] = None
911

10-
override def send(message: Message, dryRun: Boolean): String = messageId.orNull
12+
override def send(message: Message, dryRun: Boolean): String = messageId.getOrElse(generateUUID())
1113

1214
override def sendAll(messages: util.List[Message], dryRun: Boolean): BatchResponse =
1315
batchResponse.orNull

0 commit comments

Comments
 (0)