Fix follow IDs (#455)
* Generate valid IDs for Follow Fixes #449 * Use the new post-insert hook for all the models * Fix plume-cli build
This commit is contained in:
+1
-2
@@ -227,7 +227,6 @@ pub fn update(blog: String, slug: String, user: User, cl: ContentLen, form: Leni
|
||||
post.license = form.license.clone();
|
||||
post.cover_id = form.cover;
|
||||
post.update(&*conn, &searcher).expect("post::update: update error");;
|
||||
let post = post.update_ap_url(&*conn).expect("post::update: update ap url error");
|
||||
|
||||
if post.published {
|
||||
post.update_mentions(&conn, mentions.into_iter().filter_map(|m| Mention::build_activity(&conn, &m).ok()).collect())
|
||||
@@ -338,7 +337,7 @@ pub fn create(blog_name: String, form: LenientForm<NewPostForm>, user: User, cl:
|
||||
},
|
||||
&searcher,
|
||||
).expect("post::create: post save error");
|
||||
let post = post.update_ap_url(&*conn).expect("post::create: update ap url error");
|
||||
|
||||
PostAuthor::insert(&*conn, NewPostAuthor {
|
||||
post_id: post.id,
|
||||
author_id: user.id
|
||||
|
||||
Reference in New Issue
Block a user