mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-12-25 11:30:31 +00:00
Merge pull request 'Update Post.ap_url when published' (#915) from update-ap-url into main
Reviewed-on: https://git.joinplu.me/Plume/Plume/pulls/915
This commit is contained in:
commit
112c034e27
2 changed files with 8 additions and 0 deletions
|
@ -26,6 +26,7 @@
|
|||
- Menu animation not opening on iOS (#876, #897)
|
||||
- Make actors subscribe to channel once (#913)
|
||||
- Upsert posts and media instead of trying to insert and fail (#912)
|
||||
- Update post's ActivityPub id when published by update
|
||||
|
||||
## [[0.6.0]] - 2020-12-29
|
||||
|
||||
|
|
|
@ -290,6 +290,13 @@ pub fn update(
|
|||
let newly_published = if !post.published && !form.draft {
|
||||
post.published = true;
|
||||
post.creation_date = Utc::now().naive_utc();
|
||||
// TODO: share code with Post::insert()
|
||||
post.ap_url = plume_models::ap_url(&format!(
|
||||
"{}/~/{}/{}/",
|
||||
CONFIG.base_url,
|
||||
post.get_blog(&conn).unwrap().fqn,
|
||||
new_slug
|
||||
));
|
||||
true
|
||||
} else {
|
||||
false
|
||||
|
|
Loading…
Reference in a new issue