atproto Thingiverse but good
10

Configure Feed

Select the types of activity you want to include in your feed.

thing detail page stuff

Orual (Jun 29, 2026, 7:06 PM EDT) 083c4ae6 23d89f01

+43 -1
+1
src/auth.rs
··· 67 67 #[test] 68 68 fn remote_sign_out_clears_session_and_adds_toast() { 69 69 let mut session = SessionIdentity::Authenticated(crate::session::AuthenticatedIdentity { 70 + avatar: None, 70 71 did: Did::new_owned("did:plc:alice").unwrap(), 71 72 handle: Handle::new_owned("alice.test").unwrap(), 72 73 display_name: None,
+42 -1
src/session.rs
··· 1 1 use jacquard_common::deps::smol_str::{SmolStr, ToSmolStr}; 2 - use jacquard_common::types::string::{Did, Handle}; 2 + use jacquard_common::types::string::{Did, Handle, UriValue}; 3 3 use polymodel_api::space_polymodel::actor::ProfileView; 4 4 use polymodel_api::space_polymodel::actor::get_session::{GetSessionOutput, SessionView}; 5 5 #[derive(Clone, Debug, Default, PartialEq, Eq)] ··· 11 11 12 12 #[derive(Clone, Debug, PartialEq, Eq)] 13 13 pub struct AuthenticatedIdentity { 14 + pub avatar: Option<UriValue>, 14 15 pub did: Did, 15 16 pub handle: Handle, 16 17 pub display_name: Option<SmolStr>, ··· 21 22 match output.value { 22 23 SessionView::SessionUnauthenticated(_) => Self::Anonymous, 23 24 SessionView::SessionAuthenticated(session) => { 25 + let avatar = session.profile.avatar.clone(); 24 26 Self::Authenticated(AuthenticatedIdentity { 27 + avatar, 25 28 did: session.did, 26 29 handle: session.handle, 27 30 display_name: profile_display_name(&session.profile), ··· 104 107 let identity = SessionIdentity::from_get_session(output); 105 108 assert!(matches!(identity, SessionIdentity::Authenticated(_))); 106 109 assert_eq!(identity.label(), "Alice Maker"); 110 + } 111 + #[test] 112 + fn authenticated_get_session_retains_avatar() { 113 + let output = GetSessionOutput { 114 + value: SessionView::SessionAuthenticated(Box::new(SessionAuthenticated { 115 + did: Did::new_owned("did:plc:bob").unwrap(), 116 + handle: Handle::new_owned("bob.test").unwrap(), 117 + profile: ProfileView { 118 + avatar: Some(UriValue::new_owned("https://cdn.example/bob.jpg").unwrap()), 119 + default_license: None, 120 + indexed_at: None, 121 + description: None, 122 + did: Did::new_owned("did:plc:bob").unwrap(), 123 + display_name: None, 124 + handle: "bob.test".into(), 125 + pronouns: None, 126 + thing_count: None, 127 + extra_data: None, 128 + links: None, 129 + printers: None, 130 + record: jacquard::Data::Null, 131 + total_likes: None, 132 + }, 133 + extra_data: None, 134 + authenticated: true, 135 + })), 136 + extra_data: None, 137 + }; 138 + 139 + match SessionIdentity::from_get_session(output) { 140 + SessionIdentity::Authenticated(identity) => { 141 + assert_eq!( 142 + identity.avatar.as_ref().map(AsRef::as_ref), 143 + Some("https://cdn.example/bob.jpg") 144 + ); 145 + } 146 + _ => panic!("expected authenticated identity"), 147 + } 107 148 } 108 149 #[test] 109 150 fn get_session_json_decodes_unauthenticated_union_arm() {