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.
25 lines
934 B
Scala
25 lines
934 B
Scala
package com.twitter.frigate.pushservice.model.ibis
|
|
|
|
import com.twitter.finagle.stats.StatsReceiver
|
|
import com.twitter.frigate.common.base.F1FirstDegree
|
|
import com.twitter.frigate.common.base.TweetAuthorDetails
|
|
import com.twitter.frigate.pushservice.model.PushTypes.PushCandidate
|
|
import com.twitter.util.Future
|
|
|
|
trait F1FirstDegreeTweetIbis2HydratorForCandidate
|
|
extends TweetCandidateIbis2Hydrator
|
|
with RankedSocialContextIbis2Hydrator {
|
|
self: PushCandidate with F1FirstDegree with TweetAuthorDetails =>
|
|
|
|
override lazy val scopedStats: StatsReceiver = statsReceiver.scope(getClass.getSimpleName)
|
|
|
|
override lazy val tweetModelValues: Future[Map[String, String]] = {
|
|
for {
|
|
superModelValues <- super.tweetModelValues
|
|
tweetInlineModelValues <- tweetInlineActionModelValue
|
|
} yield {
|
|
superModelValues ++ otherModelValues ++ mediaModelValue ++ tweetInlineModelValues ++ inlineVideoMediaMap
|
|
}
|
|
}
|
|
}
|