mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-11 10:46:43 +02:00
fix(fediverse): add is_private field to posts to flag private posts and hide them from public views
This commit is contained in:
parent
08a3779ee3
commit
d5ef2ab86f
25 changed files with 4276 additions and 4233 deletions
|
|
@ -39,13 +39,19 @@ class NoteObject extends ObjectType
|
|||
$this->attributedTo = $post->actor->uri;
|
||||
|
||||
if ($post->in_reply_to_id !== null) {
|
||||
$this->to[] = $post->reply_to_post->actor->uri;
|
||||
if ($post->is_private) {
|
||||
$this->to = [$post->reply_to_post->actor->uri];
|
||||
} else {
|
||||
$this->to[] = $post->reply_to_post->actor->uri;
|
||||
}
|
||||
|
||||
$this->inReplyTo = $post->reply_to_post->uri;
|
||||
}
|
||||
|
||||
$this->replies = url_to('post-replies', esc($post->actor->username), $post->id);
|
||||
|
||||
$this->cc = [$post->actor->followers_url];
|
||||
if (! $post->is_private) {
|
||||
$this->cc = [$post->actor->followers_url];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue