]> Untitled Git - lemmy.git/blobdiff - crates/apub/src/protocol/objects/person.rs
Reorganize federation tests (#2092)
[lemmy.git] / crates / apub / src / protocol / objects / person.rs
index e254ed07809bef1c817eb069dbf406e0d2eb1078..0ab359dfd13c824586a5c039f968e4e8b322e447 100644 (file)
@@ -1,6 +1,6 @@
 use crate::{
   objects::person::ApubPerson,
-  protocol::{objects::Endpoints, ImageObject, Source, Unparsed},
+  protocol::{objects::Endpoints, ImageObject, Source},
 };
 use chrono::{DateTime, FixedOffset};
 use lemmy_apub_lib::{object_id::ObjectId, signatures::PublicKey};
@@ -21,9 +21,14 @@ pub struct Person {
   #[serde(rename = "type")]
   pub(crate) kind: UserTypes,
   pub(crate) id: ObjectId<ApubPerson>,
-  /// username, set at account creation and can never be changed
+  /// username, set at account creation and usually fixed after that
   pub(crate) preferred_username: String,
-  /// displayname (can be changed at any time)
+  pub(crate) inbox: Url,
+  /// mandatory field in activitypub, lemmy currently serves an empty outbox
+  pub(crate) outbox: Url,
+  pub(crate) public_key: PublicKey,
+
+  /// displayname
   pub(crate) name: Option<String>,
   pub(crate) summary: Option<String>,
   pub(crate) source: Option<Source>,
@@ -32,13 +37,7 @@ pub struct Person {
   /// user banner
   pub(crate) image: Option<ImageObject>,
   pub(crate) matrix_user_id: Option<String>,
-  pub(crate) inbox: Url,
-  /// mandatory field in activitypub, currently empty in lemmy
-  pub(crate) outbox: Url,
   pub(crate) endpoints: Option<Endpoints>,
-  pub(crate) public_key: PublicKey,
   pub(crate) published: Option<DateTime<FixedOffset>>,
   pub(crate) updated: Option<DateTime<FixedOffset>>,
-  #[serde(flatten)]
-  pub(crate) unparsed: Unparsed,
 }