diff --git a/sgx-bwmsgsv2.rb b/sgx-bwmsgsv2.rb index ff5e3934e8b2a682898fbdf9fb886f5362187d02..d8ec1cb5a9a1009a981d4e86d49e503da0c7806a 100755 --- a/sgx-bwmsgsv2.rb +++ b/sgx-bwmsgsv2.rb @@ -1017,11 +1017,11 @@ class WebhookHandler < Goliath::API # TODO: add 'errorCode' and/or 'description' val # create an error reply to the bare message - msg = Blather::StanzaError.new( - msg, + msg = msg.as_error( 'recipient-unavailable', - :wait - ).to_node + :wait, + jparams['description'] + ) # TODO: make prettier: this should be done above others_num = params['_json'][0]['to']