Change summary
lib/bwmsgsv2_repo.rb | 2 +-
lib/command.rb | 2 +-
lib/customer_usage.rb | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
Detailed changes
@@ -68,7 +68,7 @@ protected
ibr.from = from_jid
IQ_MANAGER.write(ibr).catch { nil }.then do |result|
- if result&.respond_to?(:registered?) && result&.registered?
+ if result.respond_to?(:registered?) && result.registered?
result
else
false
@@ -112,7 +112,7 @@ class Command
next EMPromise.reject(iq) unless iq.cancel?
finish(status: :canceled)
- }.catch_only(Timeout) {}.catch_only(FinalStanza) { |e|
+ }.catch_only(Timeout) { nil }.catch_only(FinalStanza) { |e|
@blather << e.stanza
}.catch do |e|
log_error(e)
@@ -50,7 +50,7 @@ class CustomerUsage
"jmp_customer_outbound_messages-#{@customer_id}",
day.strftime("%Y%m%d")
).then { |c| [day, c.to_i] if c }
- }).then { |r| Hash[r.compact].tap { |h| h.default = 0 } }
+ }).then { |r| r.compact.to_h.tap { |h| h.default = 0 } }
end
QUERY_FOR_MINUTES = <<~SQL