mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-06-01 08:48:46 +02:00
b389c3d302
Pushservice is the main recommendation service we use to surface recommendations to our users via notifications. It fetches candidates from various sources, ranks them in order of relevance, and applies filters to determine the best one to send.
18 lines
682 B
Scala
18 lines
682 B
Scala
package com.twitter.frigate.pushservice.model.ibis
|
|
|
|
import com.twitter.frigate.common.base.DiscoverTwitterCandidate
|
|
import com.twitter.frigate.pushservice.model.PushTypes.PushCandidate
|
|
import com.twitter.frigate.pushservice.util.PushIbisUtil.mergeFutModelValues
|
|
import com.twitter.util.Future
|
|
|
|
trait DiscoverTwitterPushIbis2Hydrator extends Ibis2HydratorForCandidate {
|
|
self: PushCandidate with DiscoverTwitterCandidate =>
|
|
|
|
private lazy val targetModelValues: Map[String, String] = Map(
|
|
"target_user" -> target.targetId.toString
|
|
)
|
|
|
|
override lazy val modelValues: Future[Map[String, String]] =
|
|
mergeFutModelValues(super.modelValues, Future.value(targetModelValues))
|
|
}
|