From 67fe28177ea1f45058ad8052dbf6ce3199595b4a Mon Sep 17 00:00:00 2001 From: KokaKiwi Date: Fri, 23 Nov 2018 13:17:37 +0100 Subject: [PATCH] Decode unfollow activities in inbox properly (#316) --- src/inbox.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/inbox.rs b/src/inbox.rs index 5819867..9cb1a47 100644 --- a/src/inbox.rs +++ b/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 serde_json; @@ -57,7 +68,7 @@ pub trait Inbox { Ok(()) }, "Follow" => { - Follow::delete_id(act.undo_props.object_object::()?.object_props.id_string()?, actor_id.into(), conn); + Follow::delete_id(act.undo_props.object_object::()?.object_props.id_string()?, actor_id.into(), conn); Ok(()) } _ => Err(InboxError::CantUndo)?