Destroy NotificationRequests that are dismissed (#31008)
This commit is contained in:
@@ -9,12 +9,13 @@
|
||||
# from_account_id :bigint(8) not null
|
||||
# last_status_id :bigint(8)
|
||||
# notifications_count :bigint(8) default(0), not null
|
||||
# dismissed :boolean default(FALSE), not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
|
||||
class NotificationRequest < ApplicationRecord
|
||||
self.ignored_columns += %w(dismissed)
|
||||
|
||||
include Paginable
|
||||
|
||||
MAX_MEANINGFUL_COUNT = 100
|
||||
@@ -34,8 +35,6 @@ class NotificationRequest < ApplicationRecord
|
||||
end
|
||||
|
||||
def reconsider_existence!
|
||||
return if dismissed?
|
||||
|
||||
prepare_notifications_count
|
||||
|
||||
if notifications_count.positive?
|
||||
|
||||
Reference in New Issue
Block a user