about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--kittybox-rs/src/main.rs4
-rw-r--r--kittybox-rs/src/micropub/util.rs1
-rw-r--r--kittybox-rs/templates/src/mf2.rs9
3 files changed, 9 insertions, 5 deletions
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::<std::net::SocketAddr>()
@@ -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]);
diff --git a/kittybox-rs/templates/src/mf2.rs b/kittybox-rs/templates/src/mf2.rs
index 022a206..eaac621 100644
--- a/kittybox-rs/templates/src/mf2.rs
+++ b/kittybox-rs/templates/src/mf2.rs
@@ -383,6 +383,9 @@ markup::define! {
     }
     WebInteractions<'a>(post: &'a serde_json::Value) {
         footer.webinteractions {
+            p[style="display: none", "aria-hidden"="false"] {
+                "Webmention counters:"
+            }
             ul.counters {
                 li {
                     span."icon like-icon"["aria-label"="likes"] {
@@ -393,15 +396,15 @@ markup::define! {
                     span.counter { @post["properties"]["like"].as_array().map(|a| a.len()).unwrap_or(0) }
                 }
                 li {
-                    span.icon { "💬" }
+                    span.icon["aria-label"="replies"] { "💬" }
                     span.counter { @post["properties"]["comment"].as_array().map(|a| a.len()).unwrap_or(0) }
                 }
                 li {
-                    span.icon { "🔄" }
+                    span.icon["aria-label"="reposts"] { "🔄" }
                     span.counter { @post["properties"]["repost"].as_array().map(|a| a.len()).unwrap_or(0) }
                 }
                 li {
-                    span.icon { "🔖" }
+                    span.icon["aria-label"="bookmarks"] { "🔖" }
                     span.counter { @post["properties"]["bookmark"].as_array().map(|a| a.len()).unwrap_or(0) }
                 }
             }