-
Notifications
You must be signed in to change notification settings - Fork 32
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
Spam webhook #147
Spam webhook #147
Conversation
…hook events from sendgrid
if event[:email].present? && HANDLED_EVENTS.include?(event[:event]) | ||
user = User.find_by(email: event[:email]) | ||
method_name = "process_#{event[:event]}_event".to_sym | ||
self.send(method_name, user) if user |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant self
detected.
|
||
context "when one of our mailing list emails is marked as spam" do | ||
let!(:list_user) do create(:user, email: "listemail@example.com", | ||
password: nil, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Align the elements of a hash literal if they span more than one line.
+1 |
end | ||
|
||
context "when one of our mailing list emails is marked as spam" do | ||
let!(:list_user) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid using {...} for multi-line blocks.
Fixes issues 138 and 139 by adding a service object to deal with both spam reports and bounce events from SendGrid, via webhooks