diff --git a/app/models/user.rb b/app/models/user.rb index 652168e9c00..1317decac55 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -299,8 +299,8 @@ class User < ActiveRecord::Base User.where("id = ? and seen_notification_id < ?", id, notification_id) .update_all ["seen_notification_id = ?", notification_id] - # mark all badge notifications read - Notification.where('user_id = ? AND NOT read AND notification_type = ?', id, Notification.types[:granted_badge]) + # mark all "badge granted" and "invite accepted" notifications read + Notification.where('user_id = ? AND NOT read AND notification_type IN (?)', id, [Notification.types[:granted_badge], Notification.types[:invitee_accepted]]) .update_all ["read = ?", true] end