Date/time and device type in quick report.
Fix - invalid campaign when one tried to unsubscribe from a test message before campaign was sent
This commit is contained in:
parent
2e4dc1bce4
commit
b6ed5e56b9
4 changed files with 13 additions and 7 deletions
|
@ -769,11 +769,9 @@ async function changeStatusByCampaignCidAndSubscriptionIdTx(tx, context, campaig
|
|||
])
|
||||
.first();
|
||||
|
||||
if (!message) {
|
||||
throw new Error('Invalid campaign.');
|
||||
if (message) { // If a test is send before the campaign is sent, the corresponding entry does not exists in campaign_messages. We ignore such situations as the subscriber gets unsubscribed anyway. We just don't account it to the campaign.
|
||||
await _changeStatusByMessageTx(tx, context, message, campaignMessageStatus);
|
||||
}
|
||||
|
||||
await _changeStatusByMessageTx(tx, context, message, campaignMessageStatus);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue