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)]
18 #[skip_serializing_none]
19 #[derive(Clone, Debug, Deserialize, Serialize)]
20 #[serde(rename_all = "camelCase")]
22 #[serde(rename = "type")]
23 pub(crate) kind: UserTypes,
24 pub(crate) id: ObjectId<ApubPerson>,
25 /// username, set at account creation and usually fixed after that
26 pub(crate) preferred_username: String,
27 pub(crate) inbox: Url,
28 /// mandatory field in activitypub, lemmy currently serves an empty outbox
29 pub(crate) outbox: Url,
30 pub(crate) public_key: PublicKey,
33 pub(crate) name: Option<String>,
34 pub(crate) summary: Option<String>,
35 #[serde(deserialize_with = "crate::deserialize_skip_error", default)]
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>>,