Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "LIVE-6160 Upgrade firebase to v9.2.0" #1207

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ lazy val notificationworkerlambda = lambda("notificationworkerlambda", "notifica
dockerAlias := DockerAlias(registryHost = dockerRepository.value, username = None, name = (Docker / packageName).value, tag = buildNumber),
libraryDependencies ++= Seq(
"com.turo" % "pushy" % "0.13.10",
"com.google.firebase" % "firebase-admin" % "9.2.0",
"com.google.firebase" % "firebase-admin" % "9.1.1",
"com.google.protobuf" % "protobuf-java" % "3.25.3",
"com.amazonaws" % "aws-lambda-java-events" % "2.2.9",
"com.amazonaws" % "aws-java-sdk-sqs" % awsSdkVersion,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class FcmClient (firebaseMessaging: FirebaseMessaging, firebaseApp: FirebaseApp,
import FirebaseHelpers._
val start = Instant.now
firebaseMessaging
.sendEachForMulticastAsync(message)
.sendMulticastAsync(message)
.asScala
.onComplete { response =>
val requestCompletionTime = Instant.now
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ case class BatchNotification(notification: Notification, token: List[String])

case class ChunkedTokens(notification: Notification, tokens: List[String], range: ShardRange, metadata: NotificationMetadata) {
def toNotificationToSends: List[IndividualNotification] = tokens.map(IndividualNotification(notification, _))

// the Firebase sendEachForMulticast API has a maximum limit of 500 tokens for each request
// so this grouping of 500 tokens must not be increased further
def toBatchNotificationToSends: List[BatchNotification] = tokens.grouped(500).map(BatchNotification(notification, _)).toList
}

Expand Down
Loading