Fix new post notifications not being sent

It seems that c7aeef19ea 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
This commit is contained in:
Toby Zerner 2018-11-21 22:04:52 +10:30
parent 264c730d0d
commit f6f604b0d9

View File

@ -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(