about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-10-21 17:23:03 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-10-21 17:23:03 -0400
commit41155441c9412ab0dba0b62f606cdef5488343f1 (patch)
tree97ed01ea1c946cbaab03d29577034f9dcde18192
parent00c44f229e1f2cc55ed8212e0a5ef8c5f884487b (diff)
downloadthoughts-41155441c9412ab0dba0b62f606cdef5488343f1.tar.gz
thoughts-41155441c9412ab0dba0b62f606cdef5488343f1.tar.bz2
thoughts-41155441c9412ab0dba0b62f606cdef5488343f1.zip
Reduce emails from quote submission
If I'm the submitter, it won't send the pending email. It still needs to be moderated though.
-rw-r--r--app/controllers/quotes_controller.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/quotes_controller.rb b/app/controllers/quotes_controller.rb index dd37cde..a0aa7cd 100644 --- a/app/controllers/quotes_controller.rb +++ b/app/controllers/quotes_controller.rb
@@ -180,7 +180,10 @@ class QuotesController < ApplicationController
180 @quote.state = :pending 180 @quote.state = :pending
181 @quote.save! 181 @quote.save!
182 182
183 QuoteMailer.with(quote: @quote).pending_quote_email.deliver_later 183 # hacky little thing to reduce the number of emails I get
184 unless @quote.submitter == "hatkirby"
185 QuoteMailer.with(quote: @quote).pending_quote_email.deliver_later
186 end
184 187
185 flash[:notice] = "Your quote has been submitted and is pending moderation." 188 flash[:notice] = "Your quote has been submitted and is pending moderation."
186 respond_to do |format| 189 respond_to do |format|