From 7aff26eb0ffb757b9b05d2f82fa034ad6217e780 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sun, 3 May 2020 10:22:25 -0400 Subject: [PATCH] Some additional notes, reorg. --- server/src/apub/comment.rs | 1 + server/src/apub/community.rs | 2 +- server/src/apub/mod.rs | 3 ++- server/src/apub/post.rs | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/server/src/apub/comment.rs b/server/src/apub/comment.rs index 65dd3c19a..823b9d6ae 100644 --- a/server/src/apub/comment.rs +++ b/server/src/apub/comment.rs @@ -223,6 +223,7 @@ impl ApubObjectType for Comment { .set_actor_xsd_any_uri(creator.actor_id.to_owned())? .set_object_base_box(note)?; + // TODO // Undo that fake activity let undo_id = format!("{}/undo/delete/{}", self.ap_id, uuid::Uuid::new_v4()); let mut undo = Undo::default(); diff --git a/server/src/apub/community.rs b/server/src/apub/community.rs index c4d9bf839..3a1dccb27 100644 --- a/server/src/apub/community.rs +++ b/server/src/apub/community.rs @@ -1,5 +1,4 @@ use super::*; -use activitystreams::actor::kind::GroupType; #[derive(Deserialize)] pub struct CommunityQuery { @@ -149,6 +148,7 @@ impl ActorType for Community { .set_actor_xsd_any_uri(creator.actor_id.to_owned())? .set_object_base_box(group)?; + // TODO // Undo that fake activity let undo_id = format!("{}/undo/delete/{}", self.actor_id, uuid::Uuid::new_v4()); let mut undo = Undo::default(); diff --git a/server/src/apub/mod.rs b/server/src/apub/mod.rs index 1d8605025..5b65411a3 100644 --- a/server/src/apub/mod.rs +++ b/server/src/apub/mod.rs @@ -14,7 +14,7 @@ use crate::websocket::server::SendCommunityRoomMessage; use activitystreams::object::kind::{NoteType, PageType}; use activitystreams::{ activity::{Accept, Create, Delete, Dislike, Follow, Like, Undo, Update}, - actor::{properties::ApActorProperties, Actor, Group, Person}, + actor::{kind::GroupType, properties::ApActorProperties, Actor, Group, Person}, collection::UnorderedCollection, context, endpoint::EndpointProperties, @@ -158,6 +158,7 @@ pub trait ToApub { fn to_tombstone(&self) -> Result; } +/// Updated is actually the deletion time fn create_tombstone( deleted: bool, object_id: &str, diff --git a/server/src/apub/post.rs b/server/src/apub/post.rs index 5a7383c0e..c01283fcc 100644 --- a/server/src/apub/post.rs +++ b/server/src/apub/post.rs @@ -230,6 +230,7 @@ impl ApubObjectType for Post { .set_actor_xsd_any_uri(creator.actor_id.to_owned())? .set_object_base_box(page)?; + // TODO // Undo that fake activity let undo_id = format!("{}/undo/delete/{}", self.ap_id, uuid::Uuid::new_v4()); let mut undo = Undo::default();