mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 00:08:53 +08:00
FIX: Update all does not trigger callbacks.
This commit is contained in:
@ -36,6 +36,7 @@ class Notification < ActiveRecord::Base
|
||||
|
||||
def self.mark_posts_read(user, topic_id, post_numbers)
|
||||
Notification.where(user_id: user.id, topic_id: topic_id, post_number: post_numbers, read: false).update_all "read = 't'"
|
||||
user.publish_notifications_state
|
||||
end
|
||||
|
||||
def self.interesting_after(min_date)
|
||||
|
Reference in New Issue
Block a user