Skip to content

Commit

Permalink
Do not collapse quote notifications
Browse files Browse the repository at this point in the history
This prevents an issue where edits to a post with a quote would trigger push notifications indefinitely.
  • Loading branch information
pmusaraj committed Jun 27, 2019
1 parent 4ba3547 commit 27387b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion app/services/post_alerter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ def should_notify_previous?(user, notification, opts)

COLLAPSED_NOTIFICATION_TYPES ||= [
Notification.types[:replied],
Notification.types[:quoted],
Notification.types[:posted],
Notification.types[:private_message],
]
Expand Down
4 changes: 2 additions & 2 deletions spec/services/post_alerter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def create_post_with_alerts(args = {})
}.to change(evil_trout.notifications, :count).by(0)
end

it 'notifies a user by username' do
it 'does not collapse quote notifications' do
topic = Fabricate(:topic)

expect {
Expand All @@ -194,7 +194,7 @@ def create_post_with_alerts(args = {})
topic: topic
)
end
}.to change(evil_trout.notifications, :count).by(1)
}.to change(evil_trout.notifications, :count).by(2)
end

it "won't notify the user a second time on revision" do
Expand Down

0 comments on commit 27387b0

Please sign in to comment.