Allow prev from invite code

Stephen Paul Weber created

Change summary

lib/registration.rb | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Detailed changes

lib/registration.rb 🔗

@@ -353,12 +353,14 @@ class Registration
 
 			def write
 				Command.reply { |reply|
-					reply.allowed_actions = [:next]
+					reply.allowed_actions = [:next, :prev]
 					add_form(reply)
 				}.then(&method(:parse))
 			end
 
 			def parse(iq)
+				return Activation.for(@customer, @tel).then(&:write) if iq.prev?
+
 				guard_too_many_tries.then {
 					verify(iq.form.field("code")&.value&.to_s)
 				}.then {