مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-11-30 21:32:30 +00:00
style(rubocop): Style/NumericPredicate
هذا الالتزام موجود في:
@@ -20,7 +20,7 @@ module HasMessage
|
||||
def include_message
|
||||
queued_messages = all.to_a
|
||||
server_ids = queued_messages.map(&:server_id).uniq
|
||||
if server_ids.size == 0
|
||||
if server_ids.empty?
|
||||
return []
|
||||
elsif server_ids.size > 1
|
||||
raise Postal::Error, "'include_message' can only be used on collections of messages from the same server"
|
||||
|
||||
@@ -160,7 +160,7 @@ class Server < ApplicationRecord
|
||||
total_outgoing += stat[:outgoing]
|
||||
total_bounces += stat[:bounces]
|
||||
end
|
||||
total_outgoing == 0 ? 0 : (total_bounces / total_outgoing) * 100
|
||||
total_outgoing.zero? ? 0 : (total_bounces / total_outgoing) * 100
|
||||
end
|
||||
end
|
||||
|
||||
@@ -221,7 +221,7 @@ class Server < ApplicationRecord
|
||||
|
||||
# Return the domain which can be used to authenticate emails sent from the given e-mail address.
|
||||
#
|
||||
# @param address [String] an e-mail address
|
||||
# @param address [String] an e-mail address
|
||||
# @return [Domain, nil] the domain to use for authentication
|
||||
def authenticated_domain_for_address(address)
|
||||
return nil if address.blank?
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم