WIP: use the activitystreams crate

This commit is contained in:
Bat
2018-05-16 19:20:44 +01:00
parent 1870f52332
commit c779b1c58a
14 changed files with 365 additions and 177 deletions
+4 -4
View File
@@ -1,9 +1,9 @@
use activitystreams_types::activity::Create;
use rocket::request::Form;
use rocket::response::Redirect;
use rocket_contrib::Template;
use activity_pub::activity::Create;
use activity_pub::outbox::broadcast;
use activity_pub::broadcast;
use db_conn::DbConn;
use models::comments::*;
use models::posts::Post;
@@ -41,8 +41,8 @@ fn create(blog: String, slug: String, query: CommentQuery, data: Form<NewComment
sensitive: false,
spoiler_text: "".to_string()
});
let act = Create::new(&user, &comment, &*conn);
broadcast(&*conn, &user, act, user.get_followers(&*conn));
// TODO: let act = Create::new(&user, &comment, &*conn);
// broadcast(&*conn, &user, act, user.get_followers(&*conn));
Redirect::to(format!("/~/{}/{}/#comment-{}", blog, slug, comment.id).as_ref())
}