]> Untitled Git - lemmy.git/commitdiff
Mark objects as not deleted when received via apub (fixes #2507) (#2528)
authorNutomic <me@nutomic.com>
Thu, 3 Nov 2022 13:39:30 +0000 (13:39 +0000)
committerGitHub <noreply@github.com>
Thu, 3 Nov 2022 13:39:30 +0000 (09:39 -0400)
crates/apub/src/objects/comment.rs
crates/apub/src/objects/person.rs
crates/apub/src/objects/post.rs
crates/apub/src/objects/private_message.rs
crates/apub/src/protocol/objects/group.rs

index 154bd41c982e78884667da38c9dc4553389f3569..cca092dbbacc08d99822e38c7d479b267bd59f49 100644 (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),
index e496da075229511fb128467400246c06db1134a5..41d6b777fc86d2cf5591cfa3b74f01a44788057b 100644 (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()),
index 2f6f628c2aaf6d07404a60637585a4b7bce1d521..ac9b82ebb83b3f424f4dc3c1551ab99e0e691c49 100644 (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,
index bdab7dd003f99e5238c24f343eae1d81aac9d8af..87f88de812c7c60f69d7e98cc0df6609817862cd 100644 (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),
index 5abfa2b28f582e22efeb1466765f13967430c633..7d207da49b32e8f058bba3a92066a4344ec68e63 100644 (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),