aboutsummaryrefslogtreecommitdiff
path: root/src/post/mod.rs
diff options
context:
space:
mode:
authorChristine Dodrill <me@christine.website>2021-07-08 08:14:09 -0400
committerChristine Dodrill <me@christine.website>2021-07-08 08:14:09 -0400
commitb90b9a86dbab6c9db8432c070301fc12d3b0d266 (patch)
treecec5a83bb318f969635573f8d414911176b21968 /src/post/mod.rs
parent57e78ef8a51cb277bf981fb86ca76d70761144d8 (diff)
downloadxesite-b90b9a86dbab6c9db8432c070301fc12d3b0d266.tar.xz
xesite-b90b9a86dbab6c9db8432c070301fc12d3b0d266.zip
update read time estimate
Signed-off-by: Christine Dodrill <me@christine.website>
Diffstat (limited to 'src/post/mod.rs')
-rw-r--r--src/post/mod.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/post/mod.rs b/src/post/mod.rs
index acdd325..f1fbaef 100644
--- a/src/post/mod.rs
+++ b/src/post/mod.rs
@@ -103,13 +103,20 @@ async fn read_post(dir: &str, fname: PathBuf) -> Result<Post> {
.mentioners(format!("https://christine.website/{}", link))
.await
.map_err(|why| tracing::error!("error: can't load mentions for {}: {}", link, why))
- .unwrap_or(vec![]),
+ .unwrap_or(vec![])
+ .into_iter()
+ .filter(|wm| {
+ wm.title.as_ref().unwrap_or(&"".to_string()) != &"Bridgy Response".to_string()
+ })
+ .collect(),
Err(_) => vec![],
};
let time_taken = estimated_read_time::text(
&body,
&estimated_read_time::Options::new()
+ .technical_document(true)
+ .technical_difficulty(1)
.build()
.unwrap_or_default(),
);