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
[Mailer] [Brevo] Check that tags is present in payload before calling setTags #54199
Conversation
Hey! Thanks for your PR. You are targeting branch "7.1" but it seems your PR description refers to branch "6.4". Cheers! Carsonbot |
Could you update the PR title to describe the bug fix? |
Sure, done. 👍 |
Please add a test covering the conversion of a payload that has no tags, to prevent regressions. |
Just added a test case where there are no tag in the payload, but I only did it for one event type "request". What do you think @stof , should I change the existing test cases to add the no tags variation for them also? |
Thank you @palgalik. |
tags
was removed as a mandatory parameter from Brevo remote event requests in this PR by me. Sadly, I wasn't wary enough, and I didn't added payload check before calling setTags in the PayloadConverter, and it causes TypeErrors.setTags
won't be called anymore if tags are not present in the requestAbstractMailerEvent
defaults tags as empty array, so there is no need to call the setter with empty array parameter