M lib/bwmsgsv2_repo.rb => lib/bwmsgsv2_repo.rb +1 -1
@@ 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
M lib/command.rb => lib/command.rb +1 -1
@@ 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)
M lib/customer_usage.rb => lib/customer_usage.rb +1 -1
@@ 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