1
0
mirror of https://github.com/flarum/core.git synced 2025-08-21 15:52:44 +02:00

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() $notify = $discussion->readers()
->where('users.id', '!=', $post->user_id) ->where('users.id', '!=', $post->user_id)
->where('discussion_user.subscription', 'follow') ->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(); ->get();
$this->notifications->sync( $this->notifications->sync(