Browse Source

Merge pull request #2391 from pixelfed/staging

Update NotificationTransformer, fixes #2389
daniel 4 years ago
parent
commit
307b946503
2 changed files with 3 additions and 2 deletions
  1. 1 0
      CHANGELOG.md
  2. 2 2
      app/Transformer/Api/Mastodon/v1/NotificationTransformer.php

+ 1 - 0
CHANGELOG.md

@@ -89,6 +89,7 @@
 - Updated DiscoverController, fixes ([#2378](https://github.com/pixelfed/pixelfed/issues/2378)). ([8e7f4f9d](https://github.com/pixelfed/pixelfed/commit/8e7f4f9d))
 - Updated DiscoverController, fixes ([#2378](https://github.com/pixelfed/pixelfed/issues/2378)). ([8e7f4f9d](https://github.com/pixelfed/pixelfed/commit/8e7f4f9d))
 - Updated SearchController, update version. ([8d923d77](https://github.com/pixelfed/pixelfed/commit/8d923d77))
 - Updated SearchController, update version. ([8d923d77](https://github.com/pixelfed/pixelfed/commit/8d923d77))
 - Updated email confirmation middleware, add 2FA to allow list. Fixes ([#2385](https://github.com/pixelfed/pixelfed/issues/2385)). ([27f3b29c](https://github.com/pixelfed/pixelfed/commit/27f3b29c))
 - Updated email confirmation middleware, add 2FA to allow list. Fixes ([#2385](https://github.com/pixelfed/pixelfed/issues/2385)). ([27f3b29c](https://github.com/pixelfed/pixelfed/commit/27f3b29c))
+- Updated NotificationTransformer, fixes ([#2389](https://github.com/pixelfed/pixelfed/issues/2389)). ([c4506ebd](https://github.com/pixelfed/pixelfed/commit/c4506ebd))
 
 
 ## [v0.10.9 (2020-04-17)](https://github.com/pixelfed/pixelfed/compare/v0.10.8...v0.10.9)
 ## [v0.10.9 (2020-04-17)](https://github.com/pixelfed/pixelfed/compare/v0.10.8...v0.10.9)
 ### Added
 ### Added

+ 2 - 2
app/Transformer/Api/Mastodon/v1/NotificationTransformer.php

@@ -37,10 +37,10 @@ class NotificationTransformer extends Fractal\TransformerAbstract
 			if($status) {
 			if($status) {
 				return $this->item($status, new StatusTransformer());
 				return $this->item($status, new StatusTransformer());
 			} else {
 			} else {
-				return $this->collection([], new StatusTransformer());
+				return;
 			}
 			}
 		} else {
 		} else {
-			return $this->collection([], new StatusTransformer());
+			return;
 		}
 		}
 	}
 	}