updated plugin ActivityPub version 0.15.0

This commit is contained in:
2023-01-18 16:39:54 +00:00
committed by Gitium
parent db68484a59
commit ae8dabbd21
12 changed files with 186 additions and 17 deletions

View File

@ -68,11 +68,15 @@ class Post {
}
public function generate_id() {
$post = $this->post;
$permalink = \get_permalink( $post );
$post = $this->post;
// replace 'trashed' for delete activity
return \str_replace( '__trashed', '', $permalink );
if ( 'trash' === get_post_status( $post ) ) {
$permalink = \get_post_meta( $post->ID, 'activitypub_canonical_url', true );
} else {
$permalink = \get_permalink( $post );
}
return $permalink;
}
public function generate_attachments() {