Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove random SlackSMS pin number generation #1096

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions app/services/sendgrid_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ def send_email
if send_to_sendgrid?
sendgrid_instance.client.mail._("send").post(request_body: mail.to_json)
end

message = "SlackSMS ('#{user.email}') #{message_body}"
SlackMessageJob.perform_later(message, ENV["SLACK_PIN_CHANNEL"])
end

def send_pin_email
Expand Down Expand Up @@ -117,11 +114,6 @@ def send_email_for_order(order, template_name)
end
end

def message_body
pin = user.most_recent_token.otp_code
I18n.t("twilio.browse_sms_verification_pin", pin: pin)
end

def send_to_sendgrid?
Rails.env.production? || Rails.env.staging?
end
Expand Down