mailcannon/mailcannon

View on GitHub
lib/mailcannon/reduces/envelope_bag_map.js

Summary

Maintainability
A
0 mins
Test Coverage
function () {
  values = {}
  values[this.event] = [this.target_id];

  if (this.event == 'bounce') {
      if (this.type == 'bounce') {
        emit(this.envelope_bag_id, { hard_bounce: [ this.target_id ]})
    } else {
        emit(this.envelope_bag_id, { soft_bounce: [ this.target_id ]})
    }
  }
  emit(this.envelope_bag_id, values);
}