lib/index.js
function getEventType(inboundMessage) {
    let recipientAddresses = _.map(inboundMessage.recipients, 'email');
    let ccAddresses = _.map(inboundMessage.cc, 'email');

    if (_.max([recipientAddresses.indexOf(fuse.config.inbound_address),
               recipientAddresses.indexOf(inboundMessage.to.email)]) >= 0) {
      return 'direct_email';
    }
    else if (_.max([ccAddresses.indexOf(fuse.config.inbound_address),
                    ccAddresses.indexOf(inboundMessage.to.email)]) >= 0) {
      return 'cc_email';
    }
    else {
      return 'bcc_email';
    }
  }
function getEventType(inboundMessage) {
    let recipientAddresses = _.map(inboundMessage.recipients, 'email');
    let ccAddresses = _.map(inboundMessage.cc, 'email');

    if (_.max([recipientAddresses.indexOf(fuse.config.inbound_address),
               recipientAddresses.indexOf(inboundMessage.to.email)]) >= 0) {
      return 'direct_email';
    }
    else if (_.max([ccAddresses.indexOf(fuse.config.inbound_address),
                    ccAddresses.indexOf(inboundMessage.to.email)]) >= 0) {
      return 'cc_email';
    }
    else {
      return 'bcc_email';
    }
  }
function getEventType ( inboundMessage ) { let recipientAddresses = _ . map ( inboundMessage . recipients , 'email' ) ; let ccAddresses = _ . map ( inboundMessage . cc , 'email' ) ; if ( _ . max ( [ recipientAddresses . indexOf ( fuse . config . inbound_address ) , recipientAddresses . indexOf ( inboundMessage . to . email ) ] ) >= 0 ) { return 'direct_email' ; } else if ( _ . max ( [ ccAddresses . indexOf ( fuse . config . inbound_address ) , ccAddresses . indexOf ( inboundMessage . to . email ) ] ) >= 0 ) { return 'cc_email' ; } else { return 'bcc_email' ; } }
returns a string with the event type of this message

@param {InboundMessage} inboundMessage
@returns {string} eventType
returns a string with the event type of this message