From 716c24393941ffb5a7a5ca63056c842a9efbac08 Mon Sep 17 00:00:00 2001 From: Massimiliano Ziccardi Date: Fri, 8 Jan 2021 16:39:37 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20webpush=20messages=20were?= =?UTF-8?q?=20not=20UTF-8=20encoded?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Webpush messages was encoded using the default encoding, thus generating errors when sending UTF-8 texts --- .../aerogear/unifiedpush/message/webpush/WebPushSender.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/push-sender/src/main/java/org/jboss/aerogear/unifiedpush/message/webpush/WebPushSender.java b/push-sender/src/main/java/org/jboss/aerogear/unifiedpush/message/webpush/WebPushSender.java index 6f49c50e21..34074c79ca 100644 --- a/push-sender/src/main/java/org/jboss/aerogear/unifiedpush/message/webpush/WebPushSender.java +++ b/push-sender/src/main/java/org/jboss/aerogear/unifiedpush/message/webpush/WebPushSender.java @@ -100,7 +100,7 @@ public void sendPushMessage(final Variant variant, final Collection toke try { final Notification notification = new Notification(registration.getEndpoint(), getUserPublicKey(registration), - registration.getAuthAsBytes(), gson.toJson(pushMessage.getMessage()).getBytes()); + registration.getAuthAsBytes(), gson.toJson(pushMessage.getMessage()).getBytes("UTF-8")); final HttpResponse response = webPushService.send(notification); final int responseCode = response.getStatusLine().getStatusCode();