Skip to content

Commit

Permalink
chore: Remove no-op condition in Api::V1::InboxesHelper (#4966)
Browse files Browse the repository at this point in the history
-  `smtp` cannot be nil in this context
- `anything&.nil?` will never be truthy, even if `anything` is nil
  • Loading branch information
jordan-brough committed Jul 5, 2022
1 parent 5d2cdb4 commit 4b405dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/helpers/api/v1/inboxes_helper.rb
Expand Up @@ -59,7 +59,7 @@ def check_imap_connection(channel_data)
def check_smtp_connection(channel_data, smtp)
smtp.start(channel_data[:smtp_domain], channel_data[:smtp_login], channel_data[:smtp_password],
channel_data[:smtp_authentication]&.to_sym || :login)
smtp.finish unless smtp&.nil?
smtp.finish
end

def set_smtp_encryption(channel_data, smtp)
Expand Down

0 comments on commit 4b405dc

Please sign in to comment.