zulip/zerver/webhooks/slack_incoming/fixtures
Hari Prashant Bhimaraju fd0b013bcd slack_incoming: Handle optional attachment fields aptly.
This commit checks for null values for keys within "attachment" in
the Slack integration's incoming payloads. These keys were expected
to exist optionally previously, and the existence of null values for
these wasn't anticipated. Due to an issue report for such null
values in the payload, their handling is updated appropriately.

The checks for these values are truthiness checks since the strategy
for these values being null or falsy ("", 0) is the same; we don't
process that key-value pair. This is consistent with how Slack handles
this scenario.

For the case where all the attachment fields have null values, Slack
displays this as an empty block with no content, and therefore our
strategy for this is a no-op.

Tests updated.
2022-08-22 16:40:13 -07:00
..
actions.json
attachment.json slack_incoming: Handle null blocks and attachments. 2022-06-28 17:04:53 -07:00
attachment_blocks.json slack_incoming: Support more syntax. 2022-06-28 17:04:53 -07:00
attachment_fields.json slack_incoming: Handle optional attachment fields aptly. 2022-08-22 16:40:13 -07:00
attachment_pieces.json slack_incoming: Support more syntax. 2022-06-28 17:04:53 -07:00
attachment_pieces_all_null.json slack_incoming: Handle optional attachment fields aptly. 2022-08-22 16:40:13 -07:00
attachment_pieces_footer_null.json slack_incoming: Handle optional attachment fields aptly. 2022-08-22 16:40:13 -07:00
attachment_pieces_image_url_null.json slack_incoming: Handle optional attachment fields aptly. 2022-08-22 16:40:13 -07:00
attachment_pieces_pretext_null.json slack_incoming: Handle optional attachment fields aptly. 2022-08-22 16:40:13 -07:00
attachment_pieces_text_null.json slack_incoming: Handle optional attachment fields aptly. 2022-08-22 16:40:13 -07:00
attachment_pieces_title_link_null.json slack_incoming: Handle optional attachment fields aptly. 2022-08-22 16:40:13 -07:00
attachment_pieces_title_null.json slack_incoming: Handle optional attachment fields aptly. 2022-08-22 16:40:13 -07:00
attachment_pieces_ts_null.json slack_incoming: Handle optional attachment fields aptly. 2022-08-22 16:40:13 -07:00
blocks.json
complicated.json slack_incoming: Support more syntax. 2022-06-28 17:04:53 -07:00
null_text.json slack_incoming: Handle explicit None text payload in webhook. 2021-07-15 09:37:39 -07:00
text.json
urlencoded_text.txt