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:
+2
-2
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user