diff options
-rw-r--r-- | app/models/member.rb | 2 | ||||
-rw-r--r-- | app/services/notification_service.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/models/member.rb b/app/models/member.rb index 36090676051..ec8156bbb01 100644 --- a/app/models/member.rb +++ b/app/models/member.rb @@ -55,7 +55,7 @@ class Member < ActiveRecord::Base scope :active_without_invites, -> do left_join_users .where(users: { state: 'active' }) - .where(requested_at: nil) + .non_request .reorder(nil) end diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb index e07ecda27b5..ab94db2c1e5 100644 --- a/app/services/notification_service.rb +++ b/app/services/notification_service.rb @@ -208,9 +208,9 @@ class NotificationService def new_access_request(member) return true unless member.notifiable?(:subscription) - recipients = member.source.members.owners_and_masters + recipients = member.source.members.active_without_invites.owners_and_masters if fallback_to_group_owners_masters?(recipients, member) - recipients = member.source.group.members.owners_and_masters + recipients = member.source.group.members.active_without_invites.owners_and_masters end recipients.each { |recipient| deliver_access_request_email(recipient, member) } |