zulip/zerver/webhooks/slack_incoming
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
..
fixtures slack_incoming: Handle optional attachment fields aptly. 2022-08-22 16:40:13 -07:00
__init__.py
doc.md markdown: Rewrite include plugin without markdown-include. 2022-06-26 17:36:31 -07:00
tests.py slack_incoming: Handle optional attachment fields aptly. 2022-08-22 16:40:13 -07:00
view.py slack_incoming: Handle optional attachment fields aptly. 2022-08-22 16:40:13 -07:00