mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 01:55:38 -05:00
Fixed weird behavior of MailChimp API where it wouldn't update not-yet-confirmed subscribers' email addresses when changed and we'd end up sending the opt-in email a zillion times.
This commit is contained in:
parent
c4620a7b2d
commit
91b6f1759d
1 changed files with 1 additions and 0 deletions
|
@ -123,6 +123,7 @@ UserSchema.statics.updateServiceSettings = (doc, callback) ->
|
|||
params.update_existing = true
|
||||
|
||||
onSuccess = (data) ->
|
||||
data.email = doc.get('email') # Make sure that we don't spam opt-in emails even if MailChimp doesn't udpate the email it gets in this object until they have confirmed.
|
||||
doc.set('mailChimp', data)
|
||||
doc.updatedMailChimp = true
|
||||
doc.save()
|
||||
|
|
Loading…
Reference in a new issue