diff --git a/app/models/notification/bundle.rb b/app/models/notification/bundle.rb index 306b9083f..592e77411 100644 --- a/app/models/notification/bundle.rb +++ b/app/models/notification/bundle.rb @@ -4,7 +4,7 @@ class Notification::Bundle < ApplicationRecord enum :status, %i[ pending processing delivered ] scope :due, -> { pending.where("ends_at <= ?", Time.current) } - scope :containing, -> (notification) { where("starts_at <= ? AND ends_at >= ?", notification.created_at, notification.created_at) } + scope :containing, -> (notification) { where("starts_at <= ? AND ends_at > ?", notification.created_at, notification.created_at) } scope :overlapping_with, -> (other_bundle) { where( "(starts_at <= ? AND ends_at >= ?) OR (starts_at <= ? AND ends_at >= ?) OR (starts_at >= ? AND ends_at <= ?)",