diff --git a/src/main/java/net/teumteum/alert/infra/FcmAlertPublisher.java b/src/main/java/net/teumteum/alert/infra/FcmAlertPublisher.java index 9d202a1..96bd9da 100644 --- a/src/main/java/net/teumteum/alert/infra/FcmAlertPublisher.java +++ b/src/main/java/net/teumteum/alert/infra/FcmAlertPublisher.java @@ -6,12 +6,9 @@ import com.google.firebase.ErrorCode; import com.google.firebase.FirebaseApp; import com.google.firebase.FirebaseOptions; -import com.google.firebase.messaging.AndroidConfig; -import com.google.firebase.messaging.AndroidNotification; import com.google.firebase.messaging.FirebaseMessaging; import com.google.firebase.messaging.FirebaseMessagingException; import com.google.firebase.messaging.Message; -import com.google.firebase.messaging.Notification; import jakarta.annotation.PostConstruct; import java.io.IOException; import java.util.Map; @@ -42,7 +39,6 @@ public void publish(String token, Alert alert, Map data) { private Message buildMessage(String token, Alert alert, Map data) { return Message.builder() .setToken(token) - .setAndroidConfig(buildAndroidConfig(alert)) .putData("title", alert.getTitle()) .putData("body", alert.getBody()) .putData("publishedAt", alert.getCreatedAt().toString()) @@ -71,23 +67,6 @@ private void publishWithRetry(int currentRetryCount, Message message, @Nullable } } - private Notification buildNotification(Alert alert) { - return Notification.builder() - .setTitle(alert.getTitle()) - .setBody(alert.getBody()) - .build(); - } - - private AndroidConfig buildAndroidConfig(Alert alert) { - return AndroidConfig.builder() - .setNotification(AndroidNotification.builder() - .setTitle(alert.getTitle()) - .setBody(alert.getBody()) - .setClickAction("push_click") - .build()) - .build(); - } - @PostConstruct private void fcmCredential() { try {