zulip/zerver
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 message_edit: Return a bool in maybe_send_resolve_topic_notifications. 2022-08-18 15:39:23 -07:00
data_import rocketchat: Handle PMs with only one recipient. 2022-08-09 10:58:58 -07:00
integration_fixtures/nagios tests: Add a test for fixtures for non-webhook integrations. 2021-04-28 08:16:51 -07:00
lib test_helpers: Move patch_queue_publish to test_service_bot_system. 2022-08-22 15:46:16 -07:00
management logout_all_users: Add --rotate-api-keys option to the command. 2022-08-15 17:58:05 -07:00
migrations message_edit: Make zero invalid value for message_content_edit_time_limit_seconds. 2022-08-12 18:09:53 -07:00
openapi typing: Remove FuncT. 2022-08-22 15:46:16 -07:00
tests urls: Move /hello files to the corporate folder. 2022-08-22 15:53:43 -07:00
tornado user_topic: Add user_topic event. 2022-08-04 17:44:00 -07:00
views portico: Move to corporate folder. 2022-08-22 15:53:43 -07:00
webhooks slack_incoming: Handle optional attachment fields aptly. 2022-08-22 16:40:13 -07:00
worker queue_processor: Fix type annotation for connection. 2022-07-26 18:00:24 -07:00
__init__.py django: Upgrade Zulip to Django 3.2 LTS. 2021-05-03 08:36:22 -07:00
apps.py caching: Make sender type optional for flush_cache. 2021-07-26 14:48:07 -07:00
context_processors.py footer: Reduce links for self-hosted installations on signup pages. 2022-07-22 15:46:42 -07:00
decorator.py decorator: Rename profile to user_profile. 2022-08-17 12:05:38 -07:00
filters.py typing: Fix function signatures. 2021-08-20 05:54:19 -07:00
forms.py billing: Fix licenses amount check during user signup/invitation. 2022-08-18 11:56:54 -07:00
logging_handlers.py python: Use Python 3.8 typing.{Protocol,TypedDict}. 2022-04-27 12:57:49 -07:00
middleware.py typing: Remove ViewFuncT. 2022-08-22 15:46:16 -07:00
models.py message_edit: Make zero invalid value for message_content_edit_time_limit_seconds. 2022-08-12 18:09:53 -07:00
signals.py requirements: Upgrade to Django 4.0. 2022-07-13 16:07:17 -07:00