浏览代码

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

Update ProfileController
daniel 7 年之前
父节点
当前提交
7c69c43dc9
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/Http/Controllers/ProfileController.php

+ 2 - 2
app/Http/Controllers/ProfileController.php

@@ -25,7 +25,7 @@ class ProfileController extends Controller
         'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'
         'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'
       ];
       ];
 
 
-      if(in_array($request->header('accept'), $mimes) && config('pixelfed.activitypub_enabled')) {
+      if(str_contains($request->header('accept'), $mimes) && config('pixelfed.activitypub_enabled')) {
         return $this->showActivityPub($request, $user);
         return $this->showActivityPub($request, $user);
       }
       }
       if($user->is_private == true) {
       if($user->is_private == true) {
@@ -58,7 +58,7 @@ class ProfileController extends Controller
         'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'
         'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'
       ];
       ];
 
 
-      if(in_array($request->header('accept'), $mimes) && config('pixelfed.activitypub_enabled')) {
+      if(str_contains($request->header('accept'), $mimes) && config('pixelfed.activitypub_enabled')) {
         return $this->showActivityPub($request, $user);
         return $this->showActivityPub($request, $user);
       }
       }