Remove nonstandard apub field expires (ref #2316)

This commit is contained in:
Felix Ableitner 2024-03-15 12:40:30 +01:00
parent 83a8bb1630
commit d12cb68c19
3 changed files with 2 additions and 5 deletions

View file

@ -71,7 +71,6 @@ impl BlockUser {
&context.settings().get_protocol_and_hostname(),
)?,
audience,
expires,
end_time: expires,
})
}
@ -150,7 +149,7 @@ impl ActivityHandler for BlockUser {
#[tracing::instrument(skip_all)]
async fn receive(self, context: &Data<LemmyContext>) -> Result<(), LemmyError> {
insert_received_activity(&self.id, context).await?;
let expires = self.expires.or(self.end_time).map(Into::into);
let expires = self.end_time.map(Into::into);
let mod_person = self.actor.dereference(context).await?;
let blocked_person = self.object.dereference(context).await?;
let target = self.target.dereference(context).await?;

View file

@ -98,7 +98,7 @@ impl ActivityHandler for UndoBlockUser {
#[tracing::instrument(skip_all)]
async fn receive(self, context: &Data<LemmyContext>) -> Result<(), LemmyError> {
insert_received_activity(&self.id, context).await?;
let expires = self.object.expires.or(self.object.end_time).map(Into::into);
let expires = self.object.end_time.map(Into::into);
let mod_person = self.actor.dereference(context).await?;
let blocked_person = self.object.object.dereference(context).await?;
match self.object.target.dereference(context).await? {

View file

@ -38,8 +38,6 @@ pub struct BlockUser {
pub(crate) remove_data: Option<bool>,
/// block reason, written to mod log
pub(crate) summary: Option<String>,
/// deprecated
pub(crate) expires: Option<DateTime<Utc>>,
pub(crate) end_time: Option<DateTime<Utc>>,
}