fix(send-task): Update to use Message::participants

- Fix participants method signature for correct default params
This commit is contained in:
Juan Tejada 2016-06-10 13:27:40 -07:00
parent 11fb1aefdc
commit 991453f4dc
2 changed files with 2 additions and 2 deletions

View file

@ -253,7 +253,7 @@ Message(date DESC) WHERE draft = 1`,
// Public: Returns a set of uniqued message participants by combining the
// `to`, `cc`, `bcc` && (optionally) `from` fields.
participants({includeFrom, includeBcc} = {includeFrom: true, includeBcc: false}) {
participants({includeFrom = true, includeBcc = false} = {}) {
const seen = {}
const all = []
let contacts = [].concat(this.to, this.cc)

View file

@ -96,7 +96,7 @@ export default class SendDraftTask extends BaseDraftTask {
return this.createMessageFromResponse(responseJSON);
})
.then(() => {
const recipients = this.message.to.concat(this.message.cc, this.message.bcc);
const recipients = this.message.participants({includeFrom: false, includeBcc: true})
recipients.forEach((recipient) => {
const t1 = new MultiSendToIndividualTask({
message: this.message,