Merge pull request #1122 from pixelfed/frontend-ui-refactor

Update AP Transformers, add commentsEnabled from PeerTube
This commit is contained in:
daniel 2019-04-04 11:53:58 -06:00 committed by GitHub
commit 1fb61871ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View file

@ -31,9 +31,10 @@ class CreateNote extends Fractal\TransformerAbstract
'https://www.w3.org/ns/activitystreams',
'https://w3id.org/security/v1',
[
'sc' => 'http://schema.org#',
'Hashtag' => 'as:Hashtag',
'sensitive' => 'as:sensitive',
'commentsDisabled' => 'as:commentsDisabled',
'commentsEnabled' => 'sc:Boolean',
]
],
'id' => $status->permalink(),
@ -63,7 +64,7 @@ class CreateNote extends Fractal\TransformerAbstract
];
})->toArray(),
'tag' => $tags,
'commentsDisabled' => (bool) $status->comments_disabled,
'commentsEnabled' => (bool) !$status->comments_disabled,
]
];
}

View file

@ -31,9 +31,10 @@ class Note extends Fractal\TransformerAbstract
'https://www.w3.org/ns/activitystreams',
'https://w3id.org/security/v1',
[
'sc' => 'http://schema.org#',
'Hashtag' => 'as:Hashtag',
'sensitive' => 'as:sensitive',
'commentsDisabled' => 'as:commentsDisabled',
'commentsEnabled' => 'sc:Boolean',
]
],
'id' => $status->url(),
@ -56,7 +57,7 @@ class Note extends Fractal\TransformerAbstract
];
})->toArray(),
'tag' => $tags,
'commentsDisabled' => (bool) $status->comments_disabled,
'commentsEnabled' => (bool) !$status->comments_disabled,
];
}
}