Fewer mails sent to the submitter
This commit is contained in:
parent
0cc86601d0
commit
c27b292879
@ -7,15 +7,17 @@ class EventCallbacks
|
||||
end
|
||||
|
||||
def self.before_create(event)
|
||||
event.secret = SecureRandom.urlsafe_base64(32)[0...32]
|
||||
event.moderator_mail_id = SecureRandom.urlsafe_base64(32)[0...32]
|
||||
event.submitter_mail_id = SecureRandom.urlsafe_base64(32)[0...32]
|
||||
event.secret ||= SecureRandom.urlsafe_base64(32)[0...32]
|
||||
event.moderator_mail_id ||= SecureRandom.urlsafe_base64(32)[0...32]
|
||||
event.submitter_mail_id ||= SecureRandom.urlsafe_base64(32)[0...32]
|
||||
end
|
||||
|
||||
def self.after_create(event)
|
||||
if event.event.nil?
|
||||
EventMailer.create(event).deliver_now!
|
||||
ModerationMailer.create(event).deliver_now!
|
||||
end
|
||||
end
|
||||
|
||||
def self.before_update(event)
|
||||
if event.moderated_changed? && event.moderated?
|
||||
|
Loading…
Reference in New Issue
Block a user