Comments class missing attributes
This commit is contained in:
parent
f87dbd87be
commit
1ef6fc21c1
1 changed files with 14 additions and 5 deletions
|
@ -8,8 +8,18 @@ namespace Activitypub\Model;
|
||||||
*/
|
*/
|
||||||
class Comment {
|
class Comment {
|
||||||
private $comment;
|
private $comment;
|
||||||
private $updated;
|
private $id;
|
||||||
|
private $comment_author_url;
|
||||||
|
private $post_author;
|
||||||
|
private $in_reply_to;
|
||||||
|
private $content_warning;
|
||||||
|
private $permalink;
|
||||||
|
private $context;
|
||||||
|
private $to_recipients;
|
||||||
|
private $tags;
|
||||||
|
private $update;
|
||||||
private $deleted;
|
private $deleted;
|
||||||
|
private $replies;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the class
|
* Initialize the class
|
||||||
|
@ -18,7 +28,6 @@ class Comment {
|
||||||
$this->comment = $comment;
|
$this->comment = $comment;
|
||||||
$this->id = $this->generate_comment_id();
|
$this->id = $this->generate_comment_id();
|
||||||
$this->comment_author_url = \get_author_posts_url( $this->comment->user_id );
|
$this->comment_author_url = \get_author_posts_url( $this->comment->user_id );
|
||||||
$this->safe_comment_id = $this->generate_comment_id();
|
|
||||||
$this->in_reply_to = $this->generate_parent_url();
|
$this->in_reply_to = $this->generate_parent_url();
|
||||||
$this->content_warning = $this->generate_content_warning();
|
$this->content_warning = $this->generate_content_warning();
|
||||||
$this->permalink = $this->generate_permalink();
|
$this->permalink = $this->generate_permalink();
|
||||||
|
@ -46,7 +55,7 @@ class Comment {
|
||||||
$comment = $this->comment;
|
$comment = $this->comment;
|
||||||
|
|
||||||
$array = array(
|
$array = array(
|
||||||
'id' => $this->safe_comment_id,
|
'id' => $this->id,
|
||||||
'type' => 'Note',
|
'type' => 'Note',
|
||||||
'published' => \gmdate( 'Y-m-d\TH:i:s\Z', \strtotime( $comment->comment_date_gmt ) ),
|
'published' => \gmdate( 'Y-m-d\TH:i:s\Z', \strtotime( $comment->comment_date_gmt ) ),
|
||||||
'attributedTo' => $this->comment_author_url,
|
'attributedTo' => $this->comment_author_url,
|
||||||
|
|
Loading…
Reference in a new issue