cave/trend_tag: ignore spammy tags

This commit is contained in:
Astro 2022-11-09 19:05:40 +01:00
parent e224c14c86
commit 091b01b3e3

View File

@ -83,6 +83,11 @@ impl TrendTag {
}
pub fn score(&self, period: u64, until: u64) -> f64 {
// ignore spam that comes from only 1 instance
if self.hosts().skip(1).next().is_none() {
return -1000.;
}
let from = until - period;
let mut before_mentions = 0;
let mut before_hours = 0;