Retry launch for needs_dns instead of going straight to token

Stephen Paul Weber created

Change summary

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

Detailed changes

lib/registration.rb 🔗

@@ -606,6 +606,9 @@ class Registration
 				::Snikket::Repo.new(db: db).find_by_customer(customer).then do |is|
 					if is.empty?
 						new(customer, tel, db: db)
+					elsif is[0].bootstrap_token.empty?
+						# This is a need_dns one, try the launch again
+						new(customer, tel, db: db).launch(is[0].domain)
 					else
 						GetInvite.for(customer, is[0], tel, db: db)
 					end