diff options
author | derek <wwsage@gmail.com> | 2020-07-08 20:25:13 -0400 |
---|---|---|
committer | derek <wwsage@gmail.com> | 2020-07-08 20:25:13 -0400 |
commit | e7b9ab1b3a4926d5d32ed9e87792cc9d39d4ede5 (patch) | |
tree | 1781acd682ccfb2f6b8a5b38f3e3a33c445df994 /server/src/apub/mod.rs | |
parent | 8fda7d00d5ec9e415b44aa10cff3c4d735563a20 (diff) | |
parent | 3f34e5dadfce3924554315ab9d60ec244fff0de5 (diff) |
Merge remote-tracking branch 'LemmyNet/master'
Diffstat (limited to 'server/src/apub/mod.rs')
-rw-r--r-- | server/src/apub/mod.rs | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/server/src/apub/mod.rs b/server/src/apub/mod.rs index 90df8734..561dc49a 100644 --- a/server/src/apub/mod.rs +++ b/server/src/apub/mod.rs @@ -25,20 +25,22 @@ use crate::{ MentionData, Settings, }; -use activitystreams::{ - actor::{properties::ApActorProperties, Group, Person}, - object::Page, +use activitystreams::object::Page; +use activitystreams_ext::{Ext1, Ext2}; +use activitystreams_new::{ + activity::Follow, + actor::{ApActor, Group, Person}, + object::Tombstone, + prelude::*, }; -use activitystreams_ext::{Ext1, Ext2, Ext3}; -use activitystreams_new::{activity::Follow, object::Tombstone, prelude::*}; use actix_web::{body::Body, client::Client, HttpResponse}; use chrono::NaiveDateTime; use log::debug; use serde::Serialize; use url::Url; -type GroupExt = Ext3<Group, GroupExtension, ApActorProperties, PublicKeyExtension>; -type PersonExt = Ext2<Person, ApActorProperties, PublicKeyExtension>; +type GroupExt = Ext2<ApActor<Group>, GroupExtension, PublicKeyExtension>; +type PersonExt = Ext1<ApActor<Person>, PublicKeyExtension>; type PageExt = Ext1<Page, PageExtension>; pub static APUB_JSON_CONTENT_TYPE: &str = "application/activity+json"; @@ -163,7 +165,7 @@ fn create_tombstone( pub trait FromApub { type ApubType; async fn from_apub( - apub: &Self::ApubType, + apub: &mut Self::ApubType, client: &Client, pool: &DbPool, ) -> Result<Self, LemmyError> |