Skip to content

Empty flags are not the same as false ones. #21

@bstein-clever

Description

@bstein-clever

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions