+ // Need to do this check here instead of Note::from_apub because we need the person who
+ // send the activity, not the comment author.
+ let existing_comment = self.object.id.dereference_local(context).await.ok();
+ if let (Some(distinguished), Some(existing_comment)) =
+ (self.object.distinguished, existing_comment)
+ {
+ if distinguished != existing_comment.distinguished {
+ let creator = self
+ .actor
+ .dereference(context, local_instance(context).await, request_counter)
+ .await?;
+ let (post, _) = self.object.get_parents(context, request_counter).await?;
+ is_mod_or_admin(context.pool(), creator.id, post.community_id).await?;
+ }
+ }
+