diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c893644..083654d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -85,6 +85,7 @@ - Update SettingsController, fix double json encoding and cache settings for 7 days ([4514ab1d](https://github.com/pixelfed/pixelfed/commit/4514ab1d)) - Update ApiV1Controller, fix mute/block entities ([364adb43](https://github.com/pixelfed/pixelfed/commit/364adb43)) - Update atom feed, remove invalid entities ([e362ef9e](https://github.com/pixelfed/pixelfed/commit/e362ef9e)) +- Update StatusObserver, handle events after all transactions are committed ([805a014e](https://github.com/pixelfed/pixelfed/commit/805a014e)) - ([](https://github.com/pixelfed/pixelfed/commit/)) ## [v0.11.3 (2022-05-09)](https://github.com/pixelfed/pixelfed/compare/v0.11.2...v0.11.3) diff --git a/app/Observers/AvatarObserver.php b/app/Observers/AvatarObserver.php index 31ac45eb..987db309 100644 --- a/app/Observers/AvatarObserver.php +++ b/app/Observers/AvatarObserver.php @@ -9,6 +9,13 @@ use App\Services\AccountService; class AvatarObserver { + /** + * Handle events after all transactions are committed. + * + * @var bool + */ + public $afterCommit = true; + /** * Handle the avatar "created" event. * diff --git a/app/Observers/LikeObserver.php b/app/Observers/LikeObserver.php index d7614006..bbfe8c45 100644 --- a/app/Observers/LikeObserver.php +++ b/app/Observers/LikeObserver.php @@ -7,6 +7,13 @@ use App\Services\LikeService; class LikeObserver { + /** + * Handle events after all transactions are committed. + * + * @var bool + */ + public $afterCommit = true; + /** * Handle the Like "created" event. * diff --git a/app/Observers/ModLogObserver.php b/app/Observers/ModLogObserver.php index 52a2bdd0..4d0a3d0f 100644 --- a/app/Observers/ModLogObserver.php +++ b/app/Observers/ModLogObserver.php @@ -9,6 +9,13 @@ use Log; class ModLogObserver { + /** + * Handle events after all transactions are committed. + * + * @var bool + */ + public $afterCommit = true; + /** * Handle the mod log "created" event. * diff --git a/app/Observers/NotificationObserver.php b/app/Observers/NotificationObserver.php index 7cc91a85..9444cd56 100644 --- a/app/Observers/NotificationObserver.php +++ b/app/Observers/NotificationObserver.php @@ -7,6 +7,13 @@ use App\Services\NotificationService; class NotificationObserver { + /** + * Handle events after all transactions are committed. + * + * @var bool + */ + public $afterCommit = true; + /** * Handle the notification "created" event. * diff --git a/app/Observers/ProfileObserver.php b/app/Observers/ProfileObserver.php index 8cd5caf9..b178f352 100644 --- a/app/Observers/ProfileObserver.php +++ b/app/Observers/ProfileObserver.php @@ -7,6 +7,13 @@ use App\Services\AccountService; class ProfileObserver { + /** + * Handle events after all transactions are committed. + * + * @var bool + */ + public $afterCommit = true; + /** * Handle the Profile "created" event. * diff --git a/app/Observers/StatusHashtagObserver.php b/app/Observers/StatusHashtagObserver.php index 51832bcb..5c7aa7d4 100644 --- a/app/Observers/StatusHashtagObserver.php +++ b/app/Observers/StatusHashtagObserver.php @@ -7,6 +7,13 @@ use App\Services\StatusHashtagService; class StatusHashtagObserver { + /** + * Handle events after all transactions are committed. + * + * @var bool + */ + public $afterCommit = true; + /** * Handle the notification "created" event. * diff --git a/app/Observers/StatusObserver.php b/app/Observers/StatusObserver.php index a5bd84ae..15d24cbc 100644 --- a/app/Observers/StatusObserver.php +++ b/app/Observers/StatusObserver.php @@ -7,6 +7,13 @@ use App\Services\ProfileStatusService; class StatusObserver { + /** + * Handle events after all transactions are committed. + * + * @var bool + */ + public $afterCommit = true; + /** * Handle the Status "created" event. * diff --git a/app/Observers/UserFilterObserver.php b/app/Observers/UserFilterObserver.php index fa83d690..8e149e7d 100644 --- a/app/Observers/UserFilterObserver.php +++ b/app/Observers/UserFilterObserver.php @@ -7,6 +7,13 @@ use App\Services\UserFilterService; class UserFilterObserver { + /** + * Handle events after all transactions are committed. + * + * @var bool + */ + public $afterCommit = true; + /** * Handle the user filter "created" event. *