these types do not exist in V2, which can be verified either by the
reading the bandwidth docs here[0] or by reading the commit message of cd6e0df
[0]: https://dev.bandwidth.com/docs/messaging/webhooks/#inbound-message-webhooks
@@ -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],