Browse Source

Merge branch 'federation' into federated_remove_actions

federated_remove_actions
Dessalines 9 months ago
parent
commit
dfc9637230
4 changed files with 5 additions and 2 deletions
  1. +1
    -0
      server/src/apub/comment.rs
  2. +1
    -1
      server/src/apub/community.rs
  3. +2
    -1
      server/src/apub/mod.rs
  4. +1
    -0
      server/src/apub/post.rs

+ 1
- 0
server/src/apub/comment.rs View File

@ -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();


+ 1
- 1
server/src/apub/community.rs View File

@ -1,5 +1,4 @@
use super::*;
use activitystreams::actor::kind::GroupType;
#[derive(Deserialize)]
pub struct CommunityQuery {
@ -157,6 +156,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();


+ 2
- 1
server/src/apub/mod.rs View File

@ -14,7 +14,7 @@ use crate::websocket::server::SendCommunityRoomMessage;
use activitystreams::object::kind::{NoteType, PageType};
use activitystreams::{
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,
context,
endpoint::EndpointProperties,
@ -161,6 +161,7 @@ pub trait ToApub {
fn to_tombstone(&self) -> Result<Tombstone, Error>;
}
/// Updated is actually the deletion time
fn create_tombstone(
deleted: bool,
object_id: &str,


+ 1
- 0
server/src/apub/post.rs View File

@ -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();


Loading…
Cancel
Save