diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/micropub/post.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/micropub/post.rs b/src/micropub/post.rs index 4d208c2..9edde54 100644 --- a/src/micropub/post.rs +++ b/src/micropub/post.rs @@ -330,6 +330,9 @@ async fn post_process_new_post<S: Storage>(req: Request<ApplicationState<S>>, po let source = &uid; stream::iter(posts_with_bodies.into_iter()) .filter_map(|(url, body): (surf::Url, String)| async move { + // TODO: Replace this function once the MF2 parser is ready + // A compliant parser's output format includes rels, + // we could just find a Webmention one in there let pattern = easy_scraper::Pattern::new(r#"<link href="{url}" rel="webmention">"#).expect("Pattern for webmentions couldn't be parsed"); let endpoint = &pattern.matches(&body)[0]["url"]; if let Ok(endpoint) = url.join(endpoint) { Some((url, endpoint)) } else { None } |