mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-18 09:41:01 +00:00
Delete reshares when receiving the corresponding Undo activity
This commit is contained in:
parent
82d3afe7b6
commit
7fc469fa96
1 changed files with 5 additions and 1 deletions
|
@ -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 a new issue