From f6f604b0d9c5074655af04ea43ce942e8b4697a3 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Wed, 21 Nov 2018 22:04:52 +1030 Subject: [PATCH] Fix new post notifications not being sent It seems that c7aeef19ead13a9804adf0c00895ee66d705c91e actually caused a regression. With the order of execution of extensions, this event listener was always being executed before the discussion metadata was updated, and the listener priority was not actually necessary. Fixes flarum/core#1646 --- .../src/Listener/SendNotificationWhenReplyIsPosted.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/subscriptions/src/Listener/SendNotificationWhenReplyIsPosted.php b/extensions/subscriptions/src/Listener/SendNotificationWhenReplyIsPosted.php index 303d33c49..50ef67515 100755 --- a/extensions/subscriptions/src/Listener/SendNotificationWhenReplyIsPosted.php +++ b/extensions/subscriptions/src/Listener/SendNotificationWhenReplyIsPosted.php @@ -69,7 +69,7 @@ class SendNotificationWhenReplyIsPosted $notify = $discussion->readers() ->where('users.id', '!=', $post->user_id) ->where('discussion_user.subscription', 'follow') - ->where('discussion_user.last_read_post_number', $discussion->last_post_number - 1) + ->where('discussion_user.last_read_post_number', $discussion->last_post_number) ->get(); $this->notifications->sync(