2 fetcher::object_id::ObjectId,
3 objects::person::ApubPerson,
4 protocol::{ImageObject, Source},
6 use activitystreams::{actor::Endpoints, unparsed::Unparsed, url::Url};
7 use chrono::{DateTime, FixedOffset};
8 use lemmy_apub_lib::signatures::PublicKey;
9 use serde::{Deserialize, Serialize};
10 use serde_with::skip_serializing_none;
12 #[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 can never be changed
26 pub(crate) preferred_username: String,
27 /// displayname (can be changed at any time)
28 pub(crate) name: Option<String>,
29 pub(crate) summary: Option<String>,
30 pub(crate) source: Option<Source>,
32 pub(crate) icon: Option<ImageObject>,
34 pub(crate) image: Option<ImageObject>,
35 pub(crate) matrix_user_id: Option<String>,
36 pub(crate) inbox: Url,
37 /// mandatory field in activitypub, currently empty in lemmy
38 pub(crate) outbox: Url,
39 pub(crate) endpoints: Endpoints<Url>,
40 pub(crate) public_key: PublicKey,
41 pub(crate) published: Option<DateTime<FixedOffset>>,
42 pub(crate) updated: Option<DateTime<FixedOffset>>,
44 pub(crate) unparsed: Unparsed,