don't break loops
This commit is contained in:
parent
c846b963a4
commit
97ad1285fe
|
@ -11,11 +11,11 @@ class QuestionWorker
|
|||
user = User.find(user_id)
|
||||
if rcpt == 'followers'
|
||||
user.followers.each do |f|
|
||||
Inbox.create!(user_id: f.id, question_id: question_id, new: true)
|
||||
Inbox.create(user_id: f.id, question_id: question_id, new: true)
|
||||
end
|
||||
elsif rcpt.start_with? 'grp:'
|
||||
user.groups.find_by_name!(rcpt.sub 'grp:', '').members.each do |m|
|
||||
Inbox.create!(user_id: m.user.id, question_id: question_id, new: true)
|
||||
Inbox.create(user_id: m.user.id, question_id: question_id, new: true)
|
||||
end
|
||||
else
|
||||
logger.info "unknown rcpt #{rcpt}"
|
||||
|
|
Loading…
Reference in New Issue