in common/src/main/scala/models/NotificationReport.scala [33:57]
def create(
id: UUID,
`type`: NotificationType,
notification: Notification,
sentTime: DateTime,
reports: List[SenderReport],
events: Option[EventAggregation]
) = NotificationReport(
id,
`type`,
notification,
sentTime,
reports,
events,
ttlFromSentTime(sentTime, notification)
)
private def ttlFromSentTime(sentTime: DateTime, notification: Notification): Option[Long] = {
notification.`type` match {
case BreakingNews if notification.dryRun.contains(true) => Some(sentTime.plusDays(7).getMillis / 1000)
case BreakingNews => None
case _ => Some(sentTime.plusMonths(3).getMillis / 1000)
}
}