proxy support

This commit is contained in:
Aiden McClelland
2021-01-11 13:27:52 -07:00
parent 615a5fe346
commit 24aac22b89
63 changed files with 23942 additions and 21669 deletions
+2 -1
View File
@@ -8,6 +8,7 @@ use plume_common::{activity_pub::broadcast, utils::md_to_html};
use plume_models::{
blogs::Blog, db_conn::DbConn, instance::Instance, medias::Media, mentions::*, post_authors::*,
posts::*, safe_string::SafeString, tags::*, timeline::*, users::User, Error, PlumeRocket,
CONFIG,
};
#[get("/posts/<id>")]
@@ -201,7 +202,7 @@ pub fn create(
let act = post.create_activity(&*conn)?;
let dest = User::one_by_instance(&*conn)?;
worker.execute(move || broadcast(&author, act, dest));
worker.execute(move || broadcast(&author, act, dest, CONFIG.proxy().cloned()));
}
Timeline::add_to_all_timelines(&rockets, &post, Kind::Original)?;