mirror of https://github.com/LemmyNet/lemmy.git
Adding ban_expires to person
parent
3b54acb479
commit
3b00532174
|
@ -113,6 +113,7 @@ impl ApubObject for ApubPerson {
|
|||
updated: self.updated.map(convert_datetime),
|
||||
unparsed: Default::default(),
|
||||
inbox: self.inbox_url.clone().into(),
|
||||
ban_expires: self.ban_expires.map(convert_datetime),
|
||||
};
|
||||
Ok(person)
|
||||
}
|
||||
|
@ -168,7 +169,7 @@ impl ApubObject for ApubPerson {
|
|||
inbox_url: Some(person.inbox.into()),
|
||||
shared_inbox_url: Some(person.endpoints.shared_inbox.map(|s| s.into())),
|
||||
matrix_user_id: Some(person.matrix_user_id),
|
||||
ban_expires: None,
|
||||
ban_expires: Some(person.ban_expires.map(|u| u.naive_local())),
|
||||
};
|
||||
let person = blocking(context.pool(), move |conn| {
|
||||
DbPerson::upsert(conn, &person_form)
|
||||
|
|
|
@ -39,6 +39,7 @@ pub struct Person {
|
|||
pub(crate) public_key: PublicKey,
|
||||
pub(crate) published: Option<DateTime<FixedOffset>>,
|
||||
pub(crate) updated: Option<DateTime<FixedOffset>>,
|
||||
pub(crate) ban_expires: Option<DateTime<FixedOffset>>,
|
||||
#[serde(flatten)]
|
||||
pub(crate) unparsed: Unparsed,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue