From 55b72013720e06835e273310f41c4926ffcd03d5 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 18 Oct 2018 23:18:02 +0300 Subject: Avatars for iOS notifications --- .../src/main/java/com/juick/components/APNSManager.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'juick-notifications/src/main/java/com/juick') diff --git a/juick-notifications/src/main/java/com/juick/components/APNSManager.java b/juick-notifications/src/main/java/com/juick/components/APNSManager.java index 2c7cfce4..c38d1c6f 100644 --- a/juick-notifications/src/main/java/com/juick/components/APNSManager.java +++ b/juick-notifications/src/main/java/com/juick/components/APNSManager.java @@ -57,6 +57,9 @@ public class APNSManager implements NotificationListener { ApnsPayloadBuilder apnsPayloadBuilder = new ApnsPayloadBuilder(); apnsPayloadBuilder.addCustomProperty("mid", jmsg.getMid()); apnsPayloadBuilder.addCustomProperty("uname", jmsg.getUser().getName()); + apnsPayloadBuilder.addCustomProperty("avatarUrl", + String.format("https://i.juick.com/a/%d.png", jmsg.getUser().getUid())); + apnsPayloadBuilder.setMutableContent(true); String post = PlainTextFormatter.formatPost(jmsg); String[] parts = post.split("\n", 2); apnsPayloadBuilder.setAlertTitle(parts[0]).setAlertBody(parts[1]); -- cgit v1.2.3