chore: Remove no-op condition in Api::V1::InboxesHelper (#4966)

-  `smtp` cannot be nil in this context
- `anything&.nil?` will never be truthy, even if `anything` is nil
This commit is contained in:
Jordan Brough 2022-07-05 09:12:53 -06:00 committed by GitHub
parent 5d2cdb40f5
commit 4b405dc052
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,7 +59,7 @@ module Api::V1::InboxesHelper
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)