FIX: mark invite accepted notification as read
This commit is contained in:
parent
181b04be7e
commit
eb941475fa
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue