浏览代码

Update StatusController

Daniel Supernault 6 年之前
父节点
当前提交
0d4907e34c
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      app/Http/Controllers/StatusController.php

+ 3 - 0
app/Http/Controllers/StatusController.php

@@ -125,6 +125,9 @@ class StatusController extends Controller
         $profile = $user->profile;
         $visibility = $this->validateVisibility($request->visibility);
 
+        $cw = $profile->cw == true ? true : $cw;
+        $visibility = $profile->unlisted == true && $visibility == 'public' ? 'unlisted' : $visibility;
+
         $status = new Status();
         $status->profile_id = $profile->id;
         $status->caption = strip_tags($request->caption);