diff options
author | Felix Ableitner <me@nutomic.com> | 2020-06-03 17:54:15 +0200 |
---|---|---|
committer | Felix Ableitner <me@nutomic.com> | 2020-06-03 21:44:14 +0200 |
commit | c1ef766125179c752ef43fb89a538058f54e9c9f (patch) | |
tree | a40b5e42de158758779c1794e6cfbc50dd4352d4 /server/src/apub/community.rs | |
parent | 3999e0485efadfe77e1c23bda878dba70131be06 (diff) |
migrate follow
Diffstat (limited to 'server/src/apub/community.rs')
-rw-r--r-- | server/src/apub/community.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/server/src/apub/community.rs b/server/src/apub/community.rs index 79615aca..3752798f 100644 --- a/server/src/apub/community.rs +++ b/server/src/apub/community.rs @@ -23,7 +23,7 @@ use crate::{ routes::DbPoolParam, }; use activitystreams::{ - activity::{Accept, Announce, Delete, Follow, Remove, Undo}, + activity::{Accept, Announce, Delete, Remove, Undo}, actor::{kind::GroupType, properties::ApActorProperties, Group}, collection::UnorderedCollection, context, @@ -34,7 +34,7 @@ use activitystreams::{ BaseBox, }; use activitystreams_ext::Ext3; -use activitystreams_new::object::Tombstone; +use activitystreams_new::{activity::Follow, object::Tombstone}; use actix_web::{body::Body, web::Path, HttpResponse, Result}; use diesel::PgConnection; use failure::{Error, _core::fmt::Debug}; @@ -126,11 +126,7 @@ impl ActorType for Community { /// As a local community, accept the follow request from a remote user. fn send_accept_follow(&self, follow: &Follow, conn: &PgConnection) -> Result<(), Error> { - let actor_uri = follow - .follow_props - .get_actor_xsd_any_uri() - .unwrap() - .to_string(); + let actor_uri = follow.actor.as_single_xsd_any_uri().unwrap().to_string(); let id = format!("{}/accept/{}", self.actor_id, uuid::Uuid::new_v4()); let mut accept = Accept::new(); |