the-algorithm/pushservice/src/main/scala/com/twitter/frigate/pushservice/model/ibis/F1FirstDegreeTweetIbis2Hydrator.scala
twitter-team b389c3d302 Open-sourcing pushservice
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.
2023-05-19 16:27:07 -05:00

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
}
}
}