diff options
author | Vika <vika@fireburn.ru> | 2023-07-28 19:11:45 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2023-07-28 19:20:44 +0300 |
commit | d5b7f7b180b487c01616763559fa38cbed8bb45e (patch) | |
tree | d13887bc549a88370a194795dfa2804cc8aee193 /kittybox-rs/src/database/postgres | |
parent | cf9d3a46742c5e81e91b498b9542602b059245f5 (diff) | |
download | kittybox-d5b7f7b180b487c01616763559fa38cbed8bb45e.tar.zst |
postgres: Fix pretty permalinks not being shown
Diffstat (limited to 'kittybox-rs/src/database/postgres')
-rw-r--r-- | kittybox-rs/src/database/postgres/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kittybox-rs/src/database/postgres/mod.rs b/kittybox-rs/src/database/postgres/mod.rs index 4477b9c..9176d12 100644 --- a/kittybox-rs/src/database/postgres/mod.rs +++ b/kittybox-rs/src/database/postgres/mod.rs @@ -259,7 +259,7 @@ SELECT jsonb_set( '{properties,author,0}', (SELECT mf2 FROM kittybox.mf2_json WHERE uid = mf2 #>> '{properties,author,0}') -) FROM kittybox.mf2_json WHERE uid = $1 +) FROM kittybox.mf2_json WHERE uid = $1 OR mf2['properties']['url'] ? $1 ") .bind(url) .fetch_optional(&self.db) @@ -324,7 +324,7 @@ ORDER BY mf2 #>> '{properties,published,0}' DESC .await?; tracing::debug!("Started txn: {:?}", txn); let mut feed = match sqlx::query_scalar::<_, serde_json::Value>(" -SELECT kittybox.hydrate_author(mf2) FROM kittybox.mf2_json WHERE uid = $1 +SELECT kittybox.hydrate_author(mf2) FROM kittybox.mf2_json WHERE uid = $1 OR mf2['properties']['url'] ? $1 ") .bind(url) .fetch_optional(&mut *txn) |