2 objects::person::ApubPerson,
3 protocol::{objects::Endpoints, ImageObject, Source},
5 use chrono::{DateTime, FixedOffset};
6 use lemmy_apub_lib::{object_id::ObjectId, signatures::PublicKey};
7 use serde::{Deserialize, Serialize};
8 use serde_with::skip_serializing_none;
11 #[derive(Clone, Copy, Debug, Deserialize, Serialize, PartialEq)]
17 #[skip_serializing_none]
18 #[derive(Clone, Debug, Deserialize, Serialize)]
19 #[serde(rename_all = "camelCase")]
21 #[serde(rename = "type")]
22 pub(crate) kind: UserTypes,
23 pub(crate) id: ObjectId<ApubPerson>,
24 /// username, set at account creation and usually fixed after that
25 pub(crate) preferred_username: String,
26 pub(crate) inbox: Url,
27 /// mandatory field in activitypub, lemmy currently serves an empty outbox
28 pub(crate) outbox: Url,
29 pub(crate) public_key: PublicKey,
32 pub(crate) name: Option<String>,
33 pub(crate) summary: Option<String>,
35 #[serde(deserialize_with = "crate::deserialize_skip_error")]
36 pub(crate) source: Option<Source>,
38 pub(crate) icon: Option<ImageObject>,
40 pub(crate) image: Option<ImageObject>,
41 pub(crate) matrix_user_id: Option<String>,
42 pub(crate) endpoints: Option<Endpoints>,
43 pub(crate) published: Option<DateTime<FixedOffset>>,
44 pub(crate) updated: Option<DateTime<FixedOffset>>,