message: determine if attached file is an image based on url
diff: @@ -402,12 +402,16 @@ module.exports = function(controller) {
  }
  }
  - if (bot.type == 'web') {
  + if (bot.type == 'web' || bot.type == 'socket') {
  if (topics[t].script[m].platforms && topics[t].script[m].platforms.web) {
  // attach files.
  if (topics[t].script[m].platforms.web.files) {
  message.files = [];
  for (var f = 0; f < topics[t].script[m].platforms.web.files.length; f++) {
  +
  + // determine if this is an image or any other type of file.
  + topics[t].script[m].platforms.web.files[f].image = (topics[t].script[m].platforms.web.files[f].url.match(/\.(jpeg|jpg|gif|png)$/) != null);
  +
  message.files.push(topics[t].script[m].platforms.web.files[f]);
  }
  }
  