about summary refs log tree commit diff
path: root/kittybox-rs/templates/src
diff options
context:
space:
mode:
Diffstat (limited to 'kittybox-rs/templates/src')
-rw-r--r--kittybox-rs/templates/src/indieauth.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/kittybox-rs/templates/src/indieauth.rs b/kittybox-rs/templates/src/indieauth.rs
index 908cd2c..6a46773 100644
--- a/kittybox-rs/templates/src/indieauth.rs
+++ b/kittybox-rs/templates/src/indieauth.rs
@@ -26,7 +26,13 @@ document.getElementById("indieauth_page").addEventListener("submit", submit_hand
                         "Hi, "
                             @if let Some(photo) = user["properties"]["photo"][0].as_str() {
                                 img.user_avatar[src=photo];
-                            }
+                            } else if let Some(photo) = user["properties"]["photo"][0].as_object() {
+                            img[
+                                src=photo["value"].as_str().unwrap(),
+                                alt=photo["alt"].as_str().unwrap(),
+                                loading="lazy"
+                            ];
+                        }
                         @user["properties"]["name"][0].as_str().unwrap_or("administrator")
                     }