mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-06-01 00:38:46 +02:00
ef4c5eb65e
Please note we have force-pushed a new initial commit in order to remove some publicly-available Twitter user information. Note that this process may be required in the future.
22 lines
648 B
Scala
22 lines
648 B
Scala
package com.twitter.timelineranker.model
|
|
|
|
import com.twitter.timelineranker.{thriftscala => thrift}
|
|
import com.twitter.timelines.model.tweet.HydratedTweet
|
|
import com.twitter.tweetypie.{thriftscala => tweetypie}
|
|
|
|
/**
|
|
* Enables HydratedTweet entries to be included in a Timeline.
|
|
*/
|
|
class HydratedTweetEntry(tweet: tweetypie.Tweet) extends HydratedTweet(tweet) with TimelineEntry {
|
|
|
|
def this(hydratedTweet: HydratedTweet) = this(hydratedTweet.tweet)
|
|
|
|
override def toTimelineEntryThrift: thrift.TimelineEntry = {
|
|
thrift.TimelineEntry.TweetypieTweet(tweet)
|
|
}
|
|
|
|
override def throwIfInvalid(): Unit = {
|
|
// No validation performed.
|
|
}
|
|
}
|