Go digging for Follow ID from Accept Follow

This commit is contained in:
asonix 2021-01-05 00:14:51 -06:00
parent 6ffc4e9fa3
commit 2884228a13

View file

@ -39,9 +39,13 @@ impl Action for CreateBlock {
.follows
.by_forward(self.blocked_profile, self.blocked_by_profile)
{
unimplemented!();
/*
let follow_apub_id = context.apub.apub_for_follow_request(follow_id)?.req()?;
let follow_apub_id = {
use activitystreams::{activity::Accept, prelude::*};
let accept_apub_id = context.apub.apub_for_follow(follow_id)?.req()?;
let accept = context.apub.object(&accept_apub_id)?.req()?;
let accept: Accept = accept.extend()?.req()?;
accept.object().as_single_id().req()?.to_owned()
};
Action::perform(
&UndoFollow {
follow_apub_id,
@ -49,7 +53,6 @@ impl Action for CreateBlock {
},
context,
)?;
*/
}
if let Ok(Some(follow_id)) = context
@ -58,17 +61,20 @@ impl Action for CreateBlock {
.follows
.by_backward(self.blocked_by_profile, self.blocked_profile)
{
unimplemented!();
/*
let follow_apub_id = context.apub.apub_for_follow_request(follow_id)?.req()?;
let follow_apub_id = {
use activitystreams::{activity::Accept, prelude::*};
let accept_apub_id = context.apub.apub_for_follow(follow_id)?.req()?;
let accept = context.apub.object(&accept_apub_id)?.req()?;
let accept: Accept = accept.extend()?.req()?;
accept.object().as_single_id().req()?.to_owned()
};
Action::perform(
&DeleteFollow {
&UndoFollow {
follow_apub_id,
follow_id,
},
context,
)?;
*/
}
if context.is_local(self.blocked_by_profile)? && !context.is_local(self.blocked_profile)? {