Open bstein-clever opened 6 years ago
Thanks, @bstein-clever, can you make a pull?
Sure, made https://github.com/keighl/mandrill/pull/22 There are likely other bools that could be changed but these were the only two I needed; I didn't read the docs about any of the other.
You also might want to version bump, as this would break previous code. But I'll defer to you on that.
There are a bunch of flag fields in the message object where not passing it as an argument is meaningfully different from passing it as false.
For example, there can be a global value set (in Mandrill) for track_opens and track_clicks, but because we "omitempty" on these fields in the json, https://github.com/keighl/mandrill/blob/master/mandrill.go#L83-L86 if set to
false
, they'll be removed from the Message object we send Mandrill.This means that if I have my global default set to
true
, there's no way for me to turn off the click tracking for a particular email - the field will be dropped, and then Mandrill will do the global default (click tracking=true). Sad times.I think we probably want a *bool for these, and possibly other boolean values in the message object.