浏览代码

Merge pull request #3511 from shleeable/patch-5

Update StatusTransformer.php/StatusStatelessTransformer.php
daniel 3 年之前
父节点
当前提交
6704e43af8
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      app/Transformer/Api/StatusStatelessTransformer.php
  2. 1 1
      app/Transformer/Api/StatusTransformer.php

+ 1 - 1
app/Transformer/Api/StatusStatelessTransformer.php

@@ -53,7 +53,7 @@ class StatusStatelessTransformer extends Fractal\TransformerAbstract
 			'mentions'                  => StatusMentionService::get($status->id),
 			'pf_type'                   => $status->type ?? $status->setType(),
 			'reply_count'               => (int) $status->reply_count,
-			'comments_disabled'         => $status->comments_disabled ? true : false,
+			'comments_disabled'         => (bool) $status->comments_disabled,
 			'thread'                    => false,
 			'replies'                   => [],
 			'parent'                    => [],

+ 1 - 1
app/Transformer/Api/StatusTransformer.php

@@ -56,7 +56,7 @@ class StatusTransformer extends Fractal\TransformerAbstract
 			'mentions'                  => StatusMentionService::get($status->id),
 			'pf_type'                   => $status->type ?? $status->setType(),
 			'reply_count'               => (int) $status->reply_count,
-			'comments_disabled'         => $status->comments_disabled ? true : false,
+			'comments_disabled'         => (bool) $status->comments_disabled,
 			'thread'                    => false,
 			'replies'                   => [],
 			'parent'                    => [],