Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1127 from aerogear/WEBPUSH-UTF8
Browse files Browse the repository at this point in the history
fix: πŸ› webpush messages were not UTF-8 encoded
  • Loading branch information
secondsun committed Jan 13, 2021
2 parents a522af7 + 716c243 commit e804a4a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void sendPushMessage(final Variant variant, final Collection<String> 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();
Expand Down

0 comments on commit e804a4a

Please sign in to comment.