mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-29 15:01:10 +00:00
Decode unfollow activities in inbox properly (#316)
This commit is contained in:
parent
00a205a882
commit
67fe28177e
1 changed files with 13 additions and 2 deletions
15
src/inbox.rs
15
src/inbox.rs
|
@ -1,4 +1,15 @@
|
||||||
use activitypub::{activity::{Announce, Create, Delete, Like, Undo, Update}, object::Tombstone};
|
use activitypub::{
|
||||||
|
activity::{
|
||||||
|
Announce,
|
||||||
|
Create,
|
||||||
|
Delete,
|
||||||
|
Follow as FollowAct,
|
||||||
|
Like,
|
||||||
|
Undo,
|
||||||
|
Update
|
||||||
|
},
|
||||||
|
object::Tombstone
|
||||||
|
};
|
||||||
use failure::Error;
|
use failure::Error;
|
||||||
use serde_json;
|
use serde_json;
|
||||||
|
|
||||||
|
@ -57,7 +68,7 @@ pub trait Inbox {
|
||||||
Ok(())
|
Ok(())
|
||||||
},
|
},
|
||||||
"Follow" => {
|
"Follow" => {
|
||||||
Follow::delete_id(act.undo_props.object_object::<Like>()?.object_props.id_string()?, actor_id.into(), conn);
|
Follow::delete_id(act.undo_props.object_object::<FollowAct>()?.object_props.id_string()?, actor_id.into(), conn);
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
_ => Err(InboxError::CantUndo)?
|
_ => Err(InboxError::CantUndo)?
|
||||||
|
|
Loading…
Reference in a new issue