From 6479b49c14a2c22a1c5de0d5158726d0b5b8c39b Mon Sep 17 00:00:00 2001 From: Vika Date: Tue, 9 Jul 2024 00:12:27 +0300 Subject: micropub: fix channels in ?q=config --- src/micropub/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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( .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( ); match query.q { QueryType::Config => { - let channels: Vec = match db.get_channels(user.me.as_str()).await { + let channels: Vec = match db.get_channels(&user_domain).await { Ok(chans) => chans, Err(err) => { return MicropubError::new( -- cgit 1.4.1