Skip to content

Message.ViewContentLink can't be set #71

Description

@quentinvernot

When sending a transactional message with the mandrill API, there is a flag, view_content_link, that can be set to tell mandrill to discard the sent message's content so that people who can access the logs can't click on "View content". This flag is true by default and must be hard-set to false.

However... the Message struct declares this field with omitempty, so you it won't be sent when set to false.

type Message struct {
	// ...
	ViewContentLink  bool  `json:"view_content_link,omitempty"`
	// ...
}

Removing omitempty would mean messages would always send view_content_link: false, it's a go quirk, I'm not sure if there is an "elegant" way to fix this. Maybe with a pointer to bool?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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