diff options
Diffstat (limited to 'src/database/mod.rs')
-rw-r--r-- | src/database/mod.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/database/mod.rs b/src/database/mod.rs index 6a874ed..c0f9f29 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -187,7 +187,9 @@ pub fn filter_post( .unwrap_or(&empty_vec) .iter() .map(|i| i.as_str().unwrap().to_string()); - if location_visibility == "private" && !author.any(|i| Some(i) == *user) { + if (location_visibility == "private" && !author.any(|i| Some(i) == *user)) + || (location_visibility == "protected" && user.is_none()) + { post["properties"] .as_object_mut() .unwrap() |