lib/ldclient-rb/events.rb in launchdarkly-server-sdk-6.1.0 vs lib/ldclient-rb/events.rb in launchdarkly-server-sdk-6.1.1

- old
+ new

@@ -441,19 +441,19 @@ out[:prereqOf] = event[:prereqOf] if event.has_key?(:prereqOf) out[:contextKind] = event[:contextKind] if event.has_key?(:contextKind) if @inline_users || is_debug out[:user] = process_user(event) else - out[:userKey] = event[:user].nil? ? nil : event[:user][:key] + out[:userKey] = event[:user][:key] end out[:reason] = event[:reason] if !event[:reason].nil? out when "identify" { kind: "identify", creationDate: event[:creationDate], - key: event[:user].nil? ? nil : event[:user][:key].to_s, + key: event[:user][:key].to_s, user: process_user(event) } when "custom" out = { kind: "custom", @@ -462,10 +462,10 @@ } out[:data] = event[:data] if event.has_key?(:data) if @inline_users out[:user] = process_user(event) else - out[:userKey] = event[:user].nil? ? nil : event[:user][:key] + out[:userKey] = event[:user][:key] end out[:metricValue] = event[:metricValue] if event.has_key?(:metricValue) out[:contextKind] = event[:contextKind] if event.has_key?(:contextKind) out when "index"