diff --git a/sgx_endstream.rb b/sgx_endstream.rb index ccb883f274f08883fcc9245dd35a00824c7dcd94..63026d1772a6e622b617663c48f39671875fbe5b 100755 --- a/sgx_endstream.rb +++ b/sgx_endstream.rb @@ -123,10 +123,7 @@ ibr type: :get do |iq| end ibr type: :set do |iq| - if iq.phone.nil? || phone.empty? - self << iq.reply - next - elsif iq.phone.to_s !~ /\A\+?1\d{10}\Z/ + if !iq.remove? || iq.phone.to_s !~ /\A\+?1\d{10}\Z/ self << iq.as_error("bad-request", :modify, "Invalid phone number") next end