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