about summary refs log tree commit diff
path: root/src/database/file/mod.rs
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2021-12-06 20:39:04 +0300
committerVika <vika@fireburn.ru>2021-12-06 20:42:50 +0300
commit9a9776230ce8d12d305ca8db19cc76f20ae40926 (patch)
tree26d1e166ae68825e55084b43c52afcb446521b11 /src/database/file/mod.rs
parent913779655c1feddc55d37bebbdd7df87eb7c9c0f (diff)
Added support for IndieAuth client sign in
This will allow readers to view private posts intended just for them.

Additionally fixed bugs in patterns due to which webmentions might not
have been sent.
Diffstat (limited to 'src/database/file/mod.rs')
-rw-r--r--src/database/file/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/database/file/mod.rs b/src/database/file/mod.rs
index 4fb7f47..d556f46 100644
--- a/src/database/file/mod.rs
+++ b/src/database/file/mod.rs
@@ -482,11 +482,11 @@ impl Storage for FileStorage {
                         // Hack to unwrap the Option and sieve out broken links
                         // Broken links return None, and Stream::filter_map skips Nones.
                         .try_filter_map(|post: Option<serde_json::Value>| async move { Ok(post) })
+                        .try_filter_map(|post| async move { Ok(filter_post(post, user)) })
                         .and_then(|mut post| async move {
                             hydrate_author(&mut post, user, self).await;
                             Ok(post)
                         })
-                        .try_filter_map(|post| async move { Ok(filter_post(post, user)) })
                         .take(limit);
 
                     match posts.try_collect::<Vec<serde_json::Value>>().await {