diff --git a/sgx-bwmsgsv2.rb b/sgx-bwmsgsv2.rb index 40f987e49c26e6ac50f8d646611290bcb899b33d..6a8e9b45c2dd85fa723d270ed135bce7e78b5d1c 100755 --- a/sgx-bwmsgsv2.rb +++ b/sgx-bwmsgsv2.rb @@ -1042,38 +1042,6 @@ class WebhookHandler < Goliath::API when 'in' text = '' case type - when 'sms' - text = jparams['text'] - when 'mms' - has_media = false - - if jparams['text'].empty? - if not has_media - text = '[suspected group msg '\ - 'with no text (odd)]' - end - else - text = if has_media - # TODO: write/use a caption XEP - jparams['text'] - else - '[suspected group msg '\ - '(recipient list not '\ - 'available) with '\ - 'following text] ' + - jparams['text'] - end - end - - # ie. if text param non-empty or had no media - if not text.empty? - msg = Blather::Stanza::Message.new( - bare_jid, text) - msg.from = others_num + '@' + ARGV[0] - SGXbwmsgsv2.write(msg) - end - - return [200, {}, "OK"] when 'message-received' # TODO: handle group chat, and fix above text = jparams['text'] @@ -1114,7 +1082,6 @@ class WebhookHandler < Goliath::API unless media_url.end_with?( '.smil', '.txt', '.xml' ) - has_media = true SGXbwmsgsv2.send_media( others_num + '@' + ARGV[0],