def buildPayLoad()

in src/main/scala/com/gu/mobile/content/notifications/lib/ContentAlertPayloadBuilder.scala [61:74]


  def buildPayLoad(content: Content, keyEvent: KeyEvent): ContentAlertPayload = {
    val seriesTag: Option[Tag] = content.tags.find(_.`type` == TagType.Series)
    val title: String = seriesTag.map(tag => s"Update: ${tag.webTitle}").getOrElse("Liveblog Update")
    ContentAlertPayload(
      title = Some(title),
      message = keyEvent.title,
      thumbnailUrl = content.thumbNail.map(new URI(_)),
      sender = Sender,
      link = getGuardianLink(content, Some(keyEvent)),
      importance = Importance.Major,
      topic = List(Topic(TopicTypes.Content, content.id)),
      debug = false,
      dryRun = None)
  }