From 539a84d0d05a8b6d56618bc8523498a3331a681d Mon Sep 17 00:00:00 2001 From: Jon Chambers Date: Tue, 19 May 2026 13:14:09 -0400 Subject: [PATCH] Allow `PushNotification` data to be any type of object --- .../java/org/whispersystems/textsecuregcm/push/FcmSender.java | 2 +- .../org/whispersystems/textsecuregcm/push/PushNotification.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) {