small refactor to sgx_endstream.rb

Phillip Davis created

use REGISTRATION_REPO.find instead of equivalent, raw Redis query

Change summary

sgx_endstream.rb | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

Detailed changes

sgx_endstream.rb 🔗

@@ -112,9 +112,7 @@ disco_info to: /\A\+?\d+@/ do |iq|
 end
 
 ibr type: :get do |iq|
-	REDIS.lrange(
-		"endstream_registration-#{iq.from.stripped}", 0, 2
-	).then do |creds|
+	REGISTRATION_REPO.find(iq.from).then do |creds|
 		reply = iq.reply
 		reply.registered = true if creds&.first
 		reply.phone = creds&.first.to_s