mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
FIX: Update all does not trigger callbacks.
This commit is contained in:
parent
36fa57f145
commit
cca0896b9e
2 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue