Merge branch 'federation' into federated_remove_actions

pull/722/head
Dessalines 2020-05-03 13:27:53 -04:00
commit dfc9637230
4 changed files with 5 additions and 2 deletions

View File

@ -223,6 +223,7 @@ impl ApubObjectType for Comment {
.set_actor_xsd_any_uri(creator.actor_id.to_owned())? .set_actor_xsd_any_uri(creator.actor_id.to_owned())?
.set_object_base_box(note)?; .set_object_base_box(note)?;
// TODO
// Undo that fake activity // Undo that fake activity
let undo_id = format!("{}/undo/delete/{}", self.ap_id, uuid::Uuid::new_v4()); let undo_id = format!("{}/undo/delete/{}", self.ap_id, uuid::Uuid::new_v4());
let mut undo = Undo::default(); let mut undo = Undo::default();

View File

@ -1,5 +1,4 @@
use super::*; use super::*;
use activitystreams::actor::kind::GroupType;
#[derive(Deserialize)] #[derive(Deserialize)]
pub struct CommunityQuery { pub struct CommunityQuery {
@ -157,6 +156,7 @@ impl ActorType for Community {
.set_actor_xsd_any_uri(creator.actor_id.to_owned())? .set_actor_xsd_any_uri(creator.actor_id.to_owned())?
.set_object_base_box(group)?; .set_object_base_box(group)?;
// TODO
// Undo that fake activity // Undo that fake activity
let undo_id = format!("{}/undo/delete/{}", self.actor_id, uuid::Uuid::new_v4()); let undo_id = format!("{}/undo/delete/{}", self.actor_id, uuid::Uuid::new_v4());
let mut undo = Undo::default(); let mut undo = Undo::default();

View File

@ -14,7 +14,7 @@ use crate::websocket::server::SendCommunityRoomMessage;
use activitystreams::object::kind::{NoteType, PageType}; use activitystreams::object::kind::{NoteType, PageType};
use activitystreams::{ use activitystreams::{
activity::{Accept, Create, Delete, Dislike, Follow, Like, Remove, Undo, Update}, activity::{Accept, Create, Delete, Dislike, Follow, Like, Remove, Undo, Update},
actor::{properties::ApActorProperties, Actor, Group, Person}, actor::{kind::GroupType, properties::ApActorProperties, Actor, Group, Person},
collection::UnorderedCollection, collection::UnorderedCollection,
context, context,
endpoint::EndpointProperties, endpoint::EndpointProperties,
@ -161,6 +161,7 @@ pub trait ToApub {
fn to_tombstone(&self) -> Result<Tombstone, Error>; fn to_tombstone(&self) -> Result<Tombstone, Error>;
} }
/// Updated is actually the deletion time
fn create_tombstone( fn create_tombstone(
deleted: bool, deleted: bool,
object_id: &str, object_id: &str,

View File

@ -230,6 +230,7 @@ impl ApubObjectType for Post {
.set_actor_xsd_any_uri(creator.actor_id.to_owned())? .set_actor_xsd_any_uri(creator.actor_id.to_owned())?
.set_object_base_box(page)?; .set_object_base_box(page)?;
// TODO
// Undo that fake activity // Undo that fake activity
let undo_id = format!("{}/undo/delete/{}", self.ap_id, uuid::Uuid::new_v4()); let undo_id = format!("{}/undo/delete/{}", self.ap_id, uuid::Uuid::new_v4());
let mut undo = Undo::default(); let mut undo = Undo::default();