Hotfixes

Stephen Paul Weber created

Change summary

sgx-bwmsgsv2.rb | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

Detailed changes

sgx-bwmsgsv2.rb 🔗

@@ -398,7 +398,7 @@ module SGXbwmsgsv2
 		}.then { |(jid, num_dest, *creds)|
 			if jid
 				@registration_repo.find(jid).then { |other_user|
-					[jid, num_dest] + creds + other_user.first
+					[jid, num_dest] + creds + [other_user.first]
 				}
 			else
 				[jid, num_dest] + creds + [nil]
@@ -745,9 +745,8 @@ end
 class WebhookHandler < Goliath::API
 	use Goliath::Rack::Params
 
-	@registration_repo = RegistrationRepo.new
-
 	def response(env)
+		@registration_repo = RegistrationRepo.new
 		# TODO: add timestamp grab here, and MUST include ./tai version
 
 		puts 'ENV: ' + env.reject { |k| k == 'params' }.to_s
@@ -814,7 +813,7 @@ class WebhookHandler < Goliath::API
 		bare_jid = @registration_repo.find_jid(users_num).sync
 
 		if !bare_jid
-			puts "jid_key (#{jid_key}) DNE; BW API misconfigured?"
+			puts "jid_key for (#{users_num}) DNE; BW API misconfigured?"
 
 			# TODO: likely not appropriate; give error to BW API?
 			# TODO: add text re credentials not being registered