FEATURE: Send notification by system user for bulk invite

This commit is contained in:
Arpit Jalan
2014-07-02 14:28:57 +05:30
parent df59f0a6e1
commit aeec5067d5
2 changed files with 20 additions and 2 deletions

View File

@@ -112,9 +112,9 @@ module Jobs
def notify_user
if @current_user
if (@sent > 0 && @failed == 0)
SystemMessage.create(@current_user, :bulk_invite_succeeded, sent: @sent)
SystemMessage.create_from_system_user(@current_user, :bulk_invite_succeeded, sent: @sent)
else
SystemMessage.create(@current_user, :bulk_invite_failed, sent: @sent, failed: @failed, logs: @logs.join("\n"))
SystemMessage.create_from_system_user(@current_user, :bulk_invite_failed, sent: @sent, failed: @failed, logs: @logs.join("\n"))
end
end
end