diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/push/FcmSender.java b/service/src/main/java/org/whispersystems/textsecuregcm/push/FcmSender.java index 85387ed0a..6056657f9 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/push/FcmSender.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/push/FcmSender.java @@ -91,7 +91,7 @@ public class FcmSender implements PushNotificationSender { case RATE_LIMIT_CHALLENGE -> "rateLimitChallenge"; }; - builder.putData(key, pushNotification.data() != null ? pushNotification.data() : ""); + builder.putData(key, pushNotification.data() != null ? pushNotification.data().toString() : ""); final Timer.Sample sample = Timer.start(); diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/push/PushNotification.java b/service/src/main/java/org/whispersystems/textsecuregcm/push/PushNotification.java index 3f3738de5..23d529375 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/push/PushNotification.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/push/PushNotification.java @@ -12,7 +12,7 @@ import javax.annotation.Nullable; public record PushNotification(String deviceToken, TokenType tokenType, NotificationType notificationType, - @Nullable String data, + @Nullable Object data, @Nullable Account destination, @Nullable Device destinationDevice, boolean urgent) {