Simplify the activity_pub::inbox::Notify trait + Fix notifications

Also fix a bug with the list of mentions that was returned
This commit is contained in:
Bat
2018-06-20 22:51:47 +01:00
parent d7b71848fc
commit 3551bef895
12 changed files with 67 additions and 75 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
use rocket::response::{Redirect, Flash};
use activity_pub::{broadcast, IntoId, inbox::Notify};
use activity_pub::{broadcast, inbox::Notify};
use db_conn::DbConn;
use models::{
blogs::Blog,
@@ -23,8 +23,8 @@ fn create(blog: String, slug: String, user: User, conn: DbConn) -> Redirect {
ap_url: "".to_string()
});
like.update_ap_url(&*conn);
like.notify(&*conn);
likes::Like::notify(&*conn, like.into_activity(&*conn), user.clone().into_id());
broadcast(&*conn, &user, like.into_activity(&*conn), user.get_followers(&*conn));
} else {
let like = likes::Like::find_by_user_on_post(&*conn, user.id, post.id).unwrap();