diff options
Diffstat (limited to 'src/database/postgres')
-rw-r--r-- | src/database/postgres/mod.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/database/postgres/mod.rs b/src/database/postgres/mod.rs index 3aef08e..1780672 100644 --- a/src/database/postgres/mod.rs +++ b/src/database/postgres/mod.rs @@ -373,9 +373,12 @@ WHERE ) OR ( - $3 != null AND ( - mf2['properties']['audience'] ? $3 - OR mf2['properties']['author'] ? $3 + $3 IS NOT NULL AND ( + (NOT (mf2['properties'] ? 'audience')) + OR + (mf2['properties']['audience'] ? $3) + OR + (mf2['properties']['author'] ? $3) ) ) ) @@ -385,7 +388,7 @@ LIMIT $2" ) .bind(url) .bind(limit as i64) - .bind(user.map(url::Url::to_string)) + .bind(user.map(url::Url::as_str)) .bind(cursor) .fetch_all(&mut *txn) .await |