Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message.ViewContentLink can't be set #71

Open
quentinvernot opened this issue Feb 18, 2020 · 0 comments
Open

Message.ViewContentLink can't be set #71

quentinvernot opened this issue Feb 18, 2020 · 0 comments

Comments

@quentinvernot
Copy link

quentinvernot commented Feb 18, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant