diff options
author | Dessalines <tyhou13@gmx.com> | 2020-05-01 15:01:29 -0400 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2020-05-01 15:01:29 -0400 |
commit | 5366797a4b14634f1cfee183b8b8309efd457f46 (patch) | |
tree | cb212dcba31f1f299d1f68792356d45681a03350 /server/src/apub/mod.rs | |
parent | 2f1cd9976dbdc034836a01748086056999aff52a (diff) |
Add undos for delete community, post, and comment.
Diffstat (limited to 'server/src/apub/mod.rs')
-rw-r--r-- | server/src/apub/mod.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/src/apub/mod.rs b/server/src/apub/mod.rs index b56d6744..1d860502 100644 --- a/server/src/apub/mod.rs +++ b/server/src/apub/mod.rs @@ -13,7 +13,7 @@ use crate::api::community::CommunityResponse; use crate::websocket::server::SendCommunityRoomMessage; use activitystreams::object::kind::{NoteType, PageType}; use activitystreams::{ - activity::{Accept, Create, Delete, Dislike, Follow, Like, Update}, + activity::{Accept, Create, Delete, Dislike, Follow, Like, Undo, Update}, actor::{properties::ApActorProperties, Actor, Group, Person}, collection::UnorderedCollection, context, @@ -196,11 +196,13 @@ pub trait ApubObjectType { fn send_create(&self, creator: &User_, conn: &PgConnection) -> Result<(), Error>; fn send_update(&self, creator: &User_, conn: &PgConnection) -> Result<(), Error>; fn send_delete(&self, creator: &User_, conn: &PgConnection) -> Result<(), Error>; + fn send_undo_delete(&self, creator: &User_, conn: &PgConnection) -> Result<(), Error>; } pub trait ApubLikeableType { fn send_like(&self, creator: &User_, conn: &PgConnection) -> Result<(), Error>; fn send_dislike(&self, creator: &User_, conn: &PgConnection) -> Result<(), Error>; + // TODO add send_undo_like / undo_dislike } pub fn get_shared_inbox(actor_id: &str) -> String { @@ -235,6 +237,7 @@ pub trait ActorType { } fn send_delete(&self, creator: &User_, conn: &PgConnection) -> Result<(), Error>; + fn send_undo_delete(&self, creator: &User_, conn: &PgConnection) -> Result<(), Error>; // TODO default because there is no user following yet. #[allow(unused_variables)] |