From eb58228abf97ebca4ebe18d7803cbc2ca4c5df40 Mon Sep 17 00:00:00 2001 From: Vika Date: Mon, 27 Feb 2023 00:07:51 +0300 Subject: Clarity improvements --- kittybox-rs/src/main.rs | 4 ++-- kittybox-rs/src/micropub/util.rs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'kittybox-rs/src') diff --git a/kittybox-rs/src/main.rs b/kittybox-rs/src/main.rs index 1586e60..395bb31 100644 --- a/kittybox-rs/src/main.rs +++ b/kittybox-rs/src/main.rs @@ -23,7 +23,7 @@ async fn main() { } }; - let listen_at = match env::var("SERVE_AT") + let listen_addr = match env::var("SERVE_AT") .ok() .unwrap_or_else(|| "[::]:8080".to_string()) .parse::() @@ -182,7 +182,7 @@ async fn main() { let tcp_listener = if let Ok(Some(listener)) = listenfd.take_tcp_listener(0) { listener } else { - std::net::TcpListener::bind(listen_at).unwrap() + std::net::TcpListener::bind(listen_addr).unwrap() }; // Set the socket to non-blocking so tokio can poll it // properly -- this is the async magic! diff --git a/kittybox-rs/src/micropub/util.rs b/kittybox-rs/src/micropub/util.rs index 5097878..b884e8a 100644 --- a/kittybox-rs/src/micropub/util.rs +++ b/kittybox-rs/src/micropub/util.rs @@ -129,6 +129,7 @@ pub fn normalize_mf2(mut body: serde_json::Value, user: &TokenData) -> (String, match body["type"][0].as_str() { Some("h-entry") => { // Set the channel to the main channel... + // TODO find like posts and move them to separate private channel let default_channel = me.join(DEFAULT_CHANNEL_PATH).unwrap().to_string(); body["properties"]["channel"] = json!([default_channel]); -- cgit 1.4.1