X-Git-Url: http://these/git/?a=blobdiff_plain;f=crates%2Fapub%2Fsrc%2Factivities%2Fcreate_or_update%2Fpost.rs;h=69eae583c80f833d7d2d985bbeb546247d00a01c;hb=9dfd819691676994ac52b000fc4f93dfe72bc2b3;hp=92cc708774442b536332f468c71217c7eb67bdf3;hpb=0ecf256ce32392b53b96a24ddd8f2e4e513281da;p=lemmy.git diff --git a/crates/apub/src/activities/create_or_update/post.rs b/crates/apub/src/activities/create_or_update/post.rs index 92cc7087..69eae583 100644 --- a/crates/apub/src/activities/create_or_update/post.rs +++ b/crates/apub/src/activities/create_or_update/post.rs @@ -25,7 +25,7 @@ use activitypub_federation::{ use activitystreams_kinds::public; use lemmy_api_common::{ context::LemmyContext, - post::{CreatePost, EditPost, LockPost, PostResponse, StickyPost}, + post::{CreatePost, EditPost, FeaturePost, LockPost, PostResponse}, utils::get_local_user_view_from_jwt, websocket::{send::send_post_ws_message, UserOperationCrud}, }; @@ -101,7 +101,7 @@ impl SendActivity for LockPost { } #[async_trait::async_trait(?Send)] -impl SendActivity for StickyPost { +impl SendActivity for FeaturePost { type Response = PostResponse; async fn send_activity( @@ -205,9 +205,9 @@ impl ActivityHandler for CreateOrUpdatePage { // However, when fetching a remote post we generate a new create activity with the current // locked/stickied value, so this check may fail. So only check if its a local community, // because then we will definitely receive all create and update activities separately. - let is_stickied_or_locked = + let is_featured_or_locked = self.object.stickied == Some(true) || self.object.comments_enabled == Some(false); - if community.local && is_stickied_or_locked { + if community.local && is_featured_or_locked { return Err(LemmyError::from_message( "New post cannot be stickied or locked", ));