1
0
Fork 0
forked from mirror/pixelfed

Merge pull request #3673 from pixelfed/staging

Update ap helpers to handle disabled comments
This commit is contained in:
daniel 2022-09-29 04:13:06 -06:00 committed by GitHub
commit 1d1091d583
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -88,6 +88,7 @@
- Update StatusObserver, handle events after all transactions are committed ([805a014e](https://github.com/pixelfed/pixelfed/commit/805a014e))
- Update ApiV1Controller, add collection_ids parameter to /api/v1/statuses endpoint ([7ae21fc3](https://github.com/pixelfed/pixelfed/commit/7ae21fc3))
- Update ApiV1Controller, add comments_disabled param to /api/v1/statuses endpoint ([95b58610](https://github.com/pixelfed/pixelfed/commit/95b58610))
- Update ap helpers to handle disabled comments ([92f56c9b](https://github.com/pixelfed/pixelfed/commit/92f56c9b))
- ([](https://github.com/pixelfed/pixelfed/commit/))
## [v0.11.3 (2022-05-09)](https://github.com/pixelfed/pixelfed/compare/v0.11.2...v0.11.3)

View file

@ -469,6 +469,7 @@ class Helpers {
$scope = self::getScope($activity, $url);
$cw = self::getSensitive($activity, $url);
$pid = is_object($profile) ? $profile->id : (is_array($profile) ? $profile['id'] : null);
$commentsDisabled = isset($activity['commentsEnabled']) ? !boolval($activity['commentsEnabled']) : false;
if(!$pid) {
return;
@ -490,7 +491,8 @@ class Helpers {
'scope' => $scope,
'visibility' => $scope,
'cw_summary' => ($cw == true && isset($activity['summary']) ?
Purify::clean(strip_tags($activity['summary'])) : null)
Purify::clean(strip_tags($activity['summary'])) : null),
'comments_disabled' => $commentsDisabled
]
);