Skip to content
This repository has been archived by the owner on Mar 29, 2022. It is now read-only.

Fix bad conditional transition event check for 'gifted' segment calls #439

Merged
merged 8 commits into from
Nov 18, 2019
4 changes: 3 additions & 1 deletion app/services/user_state_transition_segment_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def call(user, transition)
when :incomplete then incomplete(user)
when :ineligible then ineligible(user)
when :won then won(user, transition)
when :gift_sticker then gift_sticker(user)
when :gifted then gift_sticker(user)
fridaland marked this conversation as resolved.
Show resolved Hide resolved
end
end

Expand Down Expand Up @@ -62,6 +62,8 @@ def won(user, transition)
end
end

# TODO: change this to gift(user, transition) and check transition.to to
fridaland marked this conversation as resolved.
Show resolved Hide resolved
# add case for 'gifted_shirt'
def gift_sticker(user)
fridaland marked this conversation as resolved.
Show resolved Hide resolved
segment(user).identify(state: 'gifted_sticker')
segment(user).track('user_gifted_sticker')
Expand Down