aboutsummaryrefslogtreecommitdiff
path: root/juick-notifications/src/main/java/com/juick/components/APNSManager.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-10-18 23:18:02 +0300
committerGravatar Vitaly Takmazov2018-10-18 23:18:02 +0300
commit55b72013720e06835e273310f41c4926ffcd03d5 (patch)
tree79e3cf9678c48bf5565d3318d2cab076e4c37823 /juick-notifications/src/main/java/com/juick/components/APNSManager.java
parentaf636397574f2801e497e94faec0f781b6791ffe (diff)
Avatars for iOS notifications
Diffstat (limited to 'juick-notifications/src/main/java/com/juick/components/APNSManager.java')
-rw-r--r--juick-notifications/src/main/java/com/juick/components/APNSManager.java3
1 files changed, 3 insertions, 0 deletions
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]);