about summary refs log tree commit diff
path: root/src/micropub
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2024-07-09 00:12:27 +0300
committerVika <vika@fireburn.ru>2024-07-09 00:13:49 +0300
commit6479b49c14a2c22a1c5de0d5158726d0b5b8c39b (patch)
treed0b66fe4013972a3f4f552ee1c69a40f8e9de53f /src/micropub
parentb629dc4f7d03c493a4c173d63ef5205b6a24b838 (diff)
micropub: fix channels in ?q=config
Diffstat (limited to 'src/micropub')
-rw-r--r--src/micropub/mod.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/micropub/mod.rs b/src/micropub/mod.rs
index 835457f..8f7ff90 100644
--- a/src/micropub/mod.rs
+++ b/src/micropub/mod.rs
@@ -569,6 +569,7 @@ pub(crate) async fn query<D: Storage, A: AuthBackend>(
             .into_response();
     }
 
+    // TODO: consider replacing by `user.me.authority()`?
     let user_domain = format!(
         "{}{}",
         user.me.host_str().unwrap(),
@@ -578,7 +579,7 @@ pub(crate) async fn query<D: Storage, A: AuthBackend>(
     );
     match query.q {
         QueryType::Config => {
-            let channels: Vec<MicropubChannel> = match db.get_channels(user.me.as_str()).await {
+            let channels: Vec<MicropubChannel> = match db.get_channels(&user_domain).await {
                 Ok(chans) => chans,
                 Err(err) => {
                     return MicropubError::new(