Mark objects as not deleted when received via apub (fixes #2507)

This commit is contained in:
Felix Ableitner 2022-11-03 12:01:20 +01:00
parent cb753b045f
commit 82dcd44a03
5 changed files with 5 additions and 5 deletions

View file

@ -202,7 +202,7 @@ impl ApubObject for ApubComment {
removed: None,
published: note.published.map(|u| u.naive_local()),
updated: note.updated.map(|u| u.naive_local()),
deleted: None,
deleted: Some(false),
ap_id: Some(note.id.into()),
distinguished: note.distinguished,
local: Some(false),

View file

@ -160,7 +160,7 @@ impl ApubObject for ApubPerson {
display_name: person.name,
banned: None,
ban_expires: None,
deleted: None,
deleted: Some(false),
avatar: person.icon.map(|i| i.url.into()),
banner: person.image.map(|i| i.url.into()),
published: person.published.map(|u| u.naive_local()),

View file

@ -217,7 +217,7 @@ impl ApubObject for ApubPost {
locked: page.comments_enabled.map(|e| !e),
published: page.published.map(|u| u.naive_local()),
updated: page.updated.map(|u| u.naive_local()),
deleted: None,
deleted: Some(false),
nsfw: page.sensitive,
stickied: page.stickied,
embed_title,

View file

@ -149,7 +149,7 @@ impl ApubObject for ApubPrivateMessage {
content: read_from_string_or_source(&note.content, &None, &note.source),
published: note.published.map(|u| u.naive_local()),
updated: note.updated.map(|u| u.naive_local()),
deleted: None,
deleted: Some(false),
read: None,
ap_id: Some(note.id.into()),
local: Some(false),

View file

@ -102,7 +102,7 @@ impl Group {
removed: None,
published: self.published.map(|u| u.naive_local()),
updated: self.updated.map(|u| u.naive_local()),
deleted: None,
deleted: Some(false),
nsfw: Some(self.sensitive.unwrap_or(false)),
actor_id: Some(self.id.into()),
local: Some(false),