From 5896a9d251f13e4387fe34e0f8cd21317494ec15 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Sat, 14 Mar 2020 13:15:23 +0100 Subject: Move apub related code from websocket into api package --- server/src/api/post.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'server/src/api/post.rs') diff --git a/server/src/api/post.rs b/server/src/api/post.rs index cefa5b07..e19d4ee9 100644 --- a/server/src/api/post.rs +++ b/server/src/api/post.rs @@ -1,4 +1,5 @@ use super::*; +use crate::settings::Settings; use diesel::PgConnection; use std::str::FromStr; @@ -220,6 +221,12 @@ impl Perform for Oper { fn perform(&self, conn: &PgConnection) -> Result { let data: &GetPosts = &self.data; + if Settings::get().federation_enabled { + dbg!(&data); + // TODO: intercept here (but the type is wrong) + //get_remote_community_posts(get_posts.community_id.unwrap()) + } + let user_claims: Option = match &data.auth { Some(auth) => match Claims::decode(&auth) { Ok(claims) => Some(claims.claims), -- cgit v1.2.3