Delete reshares when receiving the corresponding Undo activity
This commit is contained in:
parent
82d3afe7b6
commit
7fc469fa96
@ -1,6 +1,6 @@
|
|||||||
use activitypub::{
|
use activitypub::{
|
||||||
Object,
|
Object,
|
||||||
activity::{Create, Like, Undo}
|
activity::{Announce, Create, Like, Undo}
|
||||||
};
|
};
|
||||||
use diesel::PgConnection;
|
use diesel::PgConnection;
|
||||||
use failure::Error;
|
use failure::Error;
|
||||||
@ -90,6 +90,10 @@ pub trait Inbox {
|
|||||||
likes::Like::delete_activity(conn, Id::new(act.undo_props.object_object::<Like>()?.object_props.id_string()?));
|
likes::Like::delete_activity(conn, Id::new(act.undo_props.object_object::<Like>()?.object_props.id_string()?));
|
||||||
Ok(())
|
Ok(())
|
||||||
},
|
},
|
||||||
|
"Announce" => {
|
||||||
|
Reshare::delete_activity(conn, Id::new(act.undo_props.object_object::<Announce>()?.object_props.id_string()?));
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
_ => Err(InboxError::CantUndo)?
|
_ => Err(InboxError::CantUndo)?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user