فهرست منبع

Merge pull request #2997 from pixelfed/staging

Staging
daniel 3 سال پیش
والد
کامیت
64112e41df
3فایلهای تغییر یافته به همراه6 افزوده شده و 3 حذف شده
  1. 2 0
      CHANGELOG.md
  2. 2 1
      app/Http/Controllers/PublicApiController.php
  3. 2 2
      app/Util/Localization/Localization.php

+ 2 - 0
CHANGELOG.md

@@ -24,6 +24,8 @@
 - Updated public timeline api, add experimental cache. ([192553ff](https://github.com/pixelfed/pixelfed/commit/192553ff))
 - Updated dark mode styles, fix black box on stories. Closes #2982. ([3169f68e](https://github.com/pixelfed/pixelfed/commit/3169f68e))
 - Updated verify_credentials api endpoint to improve performance. ([7df3540b](https://github.com/pixelfed/pixelfed/commit/7df3540b))
+- Updated Localization util, filter out .DS_Store. ([0107e8fd](https://github.com/pixelfed/pixelfed/commit/0107e8fd))
+- Updated PublicApiController, fix private account statuses api. Closes #2995. ([aa2dd26c](https://github.com/pixelfed/pixelfed/commit/aa2dd26c))
 -  ([](https://github.com/pixelfed/pixelfed/commit/))
 
 ## [v0.11.1 (2021-09-07)](https://github.com/pixelfed/pixelfed/compare/v0.11.0...v0.11.1)

+ 2 - 1
app/Http/Controllers/PublicApiController.php

@@ -382,6 +382,7 @@ class PublicApiController extends Controller
 			->filter(function($s) use($filtered) {
 				return in_array($s['account']['id'], $filtered) == false;
 			})
+			->values()
 			->toArray();
         }
 
@@ -734,7 +735,7 @@ class PublicApiController extends Controller
                 $following = Follower::whereProfileId($pid)->pluck('following_id');
                 return $following->push($pid)->toArray();
             });
-            $visibility = true == in_array($profile->id, $following) ? ['public', 'unlisted', 'private'] : [];
+            $visibility = true == in_array($profile['id'], $following) ? ['public', 'unlisted', 'private'] : [];
         } else {
             if($user) {
                 $pid = $user->profile_id;

+ 2 - 2
app/Util/Localization/Localization.php

@@ -11,8 +11,8 @@ class Localization {
 	{
 		return Cache::remember('core:localization:languages', now()->addDays(1), function() {
 			$dir = resource_path('lang');
-			return Arr::flatten(array_diff(scandir($dir), array('..', '.', 'vendor')));
+			return Arr::flatten(array_diff(scandir($dir), array('..', '.', 'vendor', '.DS_Store')));
 		});
 	}
 
-}
+}