From f7426ddbb8ec92afcdc7d193a10e4cbbf3d038e3 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Mon, 29 Aug 2022 14:04:53 -0500 Subject: [PATCH] Allow prev from invite code --- lib/registration.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/registration.rb b/lib/registration.rb index 4ee8a8a16ac6c52762252311f0fe10bbcf12e1f4..236bd196670b4ba716513298bcd3532aac051573 100644 --- a/lib/registration.rb +++ b/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 {