Merge pull request #462 from foodcoop1040/message_undeleted
Send messages only to users which have not been deleted
This commit is contained in:
commit
c32593d682
1 changed files with 1 additions and 1 deletions
|
@ -35,7 +35,7 @@ class Message < ActiveRecord::Base
|
||||||
def clean_up_recipient_ids
|
def clean_up_recipient_ids
|
||||||
add_recipients Group.find(group_id).users unless group_id.blank?
|
add_recipients Group.find(group_id).users unless group_id.blank?
|
||||||
self.recipients_ids = recipients_ids.uniq.reject { |id| id.blank? } unless recipients_ids.nil?
|
self.recipients_ids = recipients_ids.uniq.reject { |id| id.blank? } unless recipients_ids.nil?
|
||||||
self.recipients_ids = User.all.collect(&:id) if send_to_all == "1"
|
self.recipients_ids = User.undeleted.collect(&:id) if send_to_all == "1"
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_recipients(users)
|
def add_recipients(users)
|
||||||
|
|
Loading…
Reference in a new issue