mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
changed comments helper to proper return unread comments available for current_user
This commit is contained in:
parent
0c39590f2e
commit
cd2a52023b
1 changed files with 2 additions and 1 deletions
|
|
@ -280,6 +280,7 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def unread_notifications(user)
|
||||
Comment.find_since_last_login(user)
|
||||
available_conferences_ids = Conference.with_roles([:admin, :organizer, :cfp], user).pluck(:id)
|
||||
Comment.find_since_last_login(user).where(commentable_type: 'Event', commentable_id: Event.where(conference_id: available_conferences_ids))
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue