]> Untitled Git - lemmy.git/blobdiff - crates/db_views/src/post_view.rs
Some formatting
[lemmy.git] / crates / db_views / src / post_view.rs
index 192517e068bac68905d659d0e6e7ddb02e47ad67..4239357546f6f76b2ceea357797c20406df89b66 100644 (file)
@@ -238,7 +238,7 @@ impl<'a> PostQueryBuilder<'a> {
   }
 
   pub fn show_bot_accounts<T: MaybeOptional<bool>>(mut self, show_bot_accounts: T) -> Self {
-    self.show_bot_accounts = show_bot_accounts;
+    self.show_bot_accounts = show_bot_accounts.get_optional();
     self
   }
 
@@ -360,7 +360,7 @@ impl<'a> PostQueryBuilder<'a> {
         .filter(community::nsfw.eq(false));
     };
 
-    if !self.show_bot_accounts {
+    if !self.show_bot_accounts.unwrap_or(true) {
       query = query.filter(person::bot_account.eq(false));
     };