Send a Note too when publishing an article

Fixes #3
This commit is contained in:
Bat
2018-05-03 20:27:17 +01:00
parent 22cb286f86
commit b10af9776b
2 changed files with 33 additions and 0 deletions
+4
View File
@@ -58,5 +58,9 @@ fn create(blog_name: String, data: Form<NewPostForm>, user: User, conn: DbConn)
let act = Create::new(&user, &post, &*conn);
broadcast(&*conn, &user, act, user.get_followers(&*conn));
let note_act = Create::new(&user, &PostNote { post: post }, &*conn);
broadcast(&*conn, &user, note_act, user.get_followers(&*conn));
Redirect::to(format!("/~/{}/{}", blog_name, slug).as_str())
}