mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-26 13:31:02 +00:00
Call Post::publish_updated() only for local posts
This commit is contained in:
parent
ea1f4d48d5
commit
589c159eb9
1 changed files with 5 additions and 2 deletions
|
@ -15,7 +15,7 @@ use heck::KebabCase;
|
|||
use once_cell::sync::Lazy;
|
||||
use plume_common::{
|
||||
activity_pub::{
|
||||
inbox::{AsObject, FromId},
|
||||
inbox::{AsActor, AsObject, FromId},
|
||||
Hashtag, Id, IntoId, Licensed, Source, PUBLIC_VISIBILITY,
|
||||
},
|
||||
utils::md_to_html,
|
||||
|
@ -94,7 +94,10 @@ impl Post {
|
|||
let post = Self::get(conn, self.id)?;
|
||||
// TODO: Call publish_published() when newly published
|
||||
if post.published {
|
||||
self.publish_updated();
|
||||
let blog = post.get_blog(conn);
|
||||
if blog.is_ok() && blog.unwrap().is_local() {
|
||||
self.publish_updated();
|
||||
}
|
||||
}
|
||||
Ok(post)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue