1 use crate::protocol::{ImageObject, Source};
2 use activitystreams::{actor::Endpoints, unparsed::Unparsed, url::Url};
3 use chrono::{DateTime, FixedOffset};
4 use lemmy_apub_lib::signatures::PublicKey;
5 use serde::{Deserialize, Serialize};
6 use serde_with::skip_serializing_none;
8 #[derive(Clone, Copy, Debug, Deserialize, Serialize, PartialEq)]
14 #[skip_serializing_none]
15 #[derive(Clone, Debug, Deserialize, Serialize)]
16 #[serde(rename_all = "camelCase")]
18 #[serde(rename = "type")]
19 pub(crate) kind: UserTypes,
21 /// username, set at account creation and can never be changed
22 pub(crate) preferred_username: String,
23 /// displayname (can be changed at any time)
24 pub(crate) name: Option<String>,
25 pub(crate) summary: Option<String>,
26 pub(crate) source: Option<Source>,
28 pub(crate) icon: Option<ImageObject>,
30 pub(crate) image: Option<ImageObject>,
31 pub(crate) matrix_user_id: Option<String>,
32 pub(crate) inbox: Url,
33 /// mandatory field in activitypub, currently empty in lemmy
34 pub(crate) outbox: Url,
35 pub(crate) endpoints: Endpoints<Url>,
36 pub(crate) public_key: PublicKey,
37 pub(crate) published: Option<DateTime<FixedOffset>>,
38 pub(crate) updated: Option<DateTime<FixedOffset>>,
40 pub(crate) unparsed: Unparsed,