Skip to content

[77455] Prevent Event from sending empty notification array when notifications were not set#298

Merged
mrashed-dev merged 4 commits into
mainfrom
mostafarashed/sc-77455/prevent-sending-empty-notification-array
Jan 4, 2022
Merged

[77455] Prevent Event from sending empty notification array when notifications were not set#298
mrashed-dev merged 4 commits into
mainfrom
mostafarashed/sc-77455/prevent-sending-empty-notification-array

Conversation

@mrashed-dev
Copy link
Copy Markdown
Contributor

Description

Some recurring events throw an error from the API when sending an empty list of notifications. This could occur without the user setting an empty list of notifications as the Node SDK defaults all array-type attributes to an empty array even if not directly set the attribute. This PR overrides this functionality and prevents notifications from being set if the user did not explicitly set the attribute.

License

I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

Sending an empty event for certain events like recurring events will cause an API error, so unless explicitly set do not sent the notification object
@mrashed-dev mrashed-dev requested a review from philrenaud January 4, 2022 21:58
@shortcut-integration
Copy link
Copy Markdown

@mrashed-dev mrashed-dev merged commit 8c11bfd into main Jan 4, 2022
@mrashed-dev mrashed-dev deleted the mostafarashed/sc-77455/prevent-sending-empty-notification-array branch January 4, 2022 22:02
@mrashed-dev mrashed-dev mentioned this pull request Jan 4, 2022
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

Successfully merging this pull request may close these issues.

2 participants