in notificationworkerlambda/src/main/scala/com/gu/notifications/worker/delivery/apns/models/payload/ApnsPayloadBuilder.scala [85:105]
private def contentPayload(n: ContentNotification): ApnsPayload = {
val link = toPlatformLink(n.link)
val payLoad = PushyPayload(
alertTitle = n.title,
alertBody = n.message,
categoryName = Some("ITEM_CATEGORY"),
mutableContent = true,
sound = Some("default"),
customProperties = Seq(
CustomProperty(Keys.UniqueIdentifier -> n.id.toString),
CustomProperty(Keys.Provider -> Provider.Guardian.value),
CustomProperty(Keys.MessageType -> MessageTypes.NewsAlert),
CustomProperty(Keys.NotificationType -> Content.value),
CustomProperty(Keys.Link -> toIosLink(n.link).toString),
CustomProperty(Keys.Topics -> n.topic.map(_.toString).mkString(",")),
CustomProperty(Keys.Uri -> new URI(link.uri).toString),
CustomProperty(Keys.UriType -> link.`type`.toString)
)
).payload
ApnsPayload(payLoad, None, toCollapseId(n.link), PushType.ALERT)
}