Fix local notifications

This commit is contained in:
Bat
2018-06-18 12:32:03 +01:00
parent cdb8aba6ec
commit 36bf2e114c
6 changed files with 16 additions and 11 deletions
+2 -1
View File
@@ -1,6 +1,6 @@
use rocket::response::{Redirect, Flash};
use activity_pub::broadcast;
use activity_pub::{broadcast, IntoId, inbox::Notify};
use db_conn::DbConn;
use models::{
posts::Post,
@@ -22,6 +22,7 @@ fn create(blog: String, slug: String, user: User, conn: DbConn) -> Redirect {
});
reshare.update_ap_url(&*conn);
Reshare::notify(&*conn, reshare.into_activity(&*conn), user.clone().into_id());
broadcast(&*conn, &user, reshare.into_activity(&*conn), user.get_followers(&*conn));
} else {
let reshare = Reshare::find_by_user_on_post(&*conn, &user, &post).unwrap();