zulip/zerver/lib
PIG208 2f9c586af5 webhooks: Allow event registration using webhook_view decorator.
In addition to event filtering, we add support for registering supported
events for a webhook integration using the webhook_view decorator.

The event types are stored in the view function directly as a function
attribute, and can be later accessed via the module path and the view
function name are given (which is already specified the integrations.py)

Note that the WebhookTestCase doesn't know the name of the view function
and the module of the webhook. WEBHOOK_DIR_NAME needs to be overridden
if we want exceptions to raised when one of our test functions triggered
a unspecified event, but this practice is not enforced.

all_event_type does not need to be given even if event filters are used
in the webhook. But if a list of event types is given, it will be possible
for us to include it in the documentation while ensuring that all the
tested events are included (but not vice versa at the current stage, as
we yet not required all the events included in the list to be tested)

This guarantees that we can always access the list of all the tested
events of a webhook. This feature will be later plumbed to marcos to
display all event types dynamically in doc.md.
2021-07-05 19:10:31 -07:00
..
markdown docs: Correct Big Blue Button to BigBlueButton. 2021-07-05 16:59:00 -07:00
url_preview python: Convert deprecated Django smart_text alias to smart_str. 2021-04-15 18:01:34 -07:00
webhooks webhooks: Support configuring destination stream by id. 2021-06-30 09:31:07 -07:00
__init__.py
actions.py mentions: Send user group mention data to notification notices. 2021-07-05 14:23:59 -07:00
addressee.py python: Convert deprecated Django ugettext alias to gettext. 2021-04-15 18:01:34 -07:00
alert_words.py python: Reformat with Black, except quotes. 2021-02-12 13:11:19 -08:00
attachments.py python: Convert deprecated Django ugettext alias to gettext. 2021-04-15 18:01:34 -07:00
avatar.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
avatar_hash.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
bot_config.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
bot_lib.py embedded bot: Return message id for send_message and send_reply. 2021-04-28 08:32:21 -07:00
bot_storage.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
bulk_create.py mypy: Don’t use Iterable for values iterated multiple times. 2021-04-29 16:06:17 -07:00
cache.py cache: Use `id`s instead of `UserProfile`s for get_muting_users. 2021-06-07 13:41:37 -07:00
cache_helpers.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
camo.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
ccache.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
compatibility.py compatibility: Shift functions to new module. 2021-06-05 07:33:25 -07:00
context_managers.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
create_user.py users: Remove redundant get_role_for_new_user in lib/create_user.py. 2021-04-30 15:57:09 -07:00
data_types.py python: Reformat with Black, except quotes. 2021-02-12 13:11:19 -08:00
db.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
debug.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
dev_ldap_directory.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
digest.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
display_recipient.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
domains.py python: Convert deprecated Django ugettext alias to gettext. 2021-04-15 18:01:34 -07:00
email_mirror.py email_mirror: Improve filter_footer delimiter detection 2021-06-17 09:11:28 -07:00
email_mirror_helpers.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
email_notifications.py email_notifications: Show mentioned user group in email notifications. 2021-07-05 14:23:59 -07:00
email_validation.py python: Convert deprecated Django ugettext alias to gettext. 2021-04-15 18:01:34 -07:00
emoji.py minor: Convert `emoticon_regex` to uppercase. 2021-05-18 17:31:25 -07:00
error_notify.py python: Migrate most json_error => JsonableError. 2021-06-30 16:22:38 -07:00
event_schema.py events: Add heartbeat events to tests and documentation. 2021-07-01 17:14:32 -07:00
events.py events: Add heartbeat events to tests and documentation. 2021-07-01 17:14:32 -07:00
exceptions.py exceptions: Add ResourceNotFoundError. 2021-07-05 11:02:12 -07:00
export.py docs: Fix capitalization mistakes. 2021-05-10 09:57:26 -07:00
external_accounts.py docs: Fix capitalization mistakes. 2021-05-10 09:57:26 -07:00
fix_unreads.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
generate_test_data.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
github.py apps: Link to macOS Apple silicon native build. 2021-05-06 17:52:00 -07:00
home.py left_sidebar: Migrate to handlebars. 2021-07-05 18:49:43 -07:00
hotspots.py docs: Fix spelling errors caught by codespell. 2021-04-26 09:31:08 -07:00
html_diff.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
html_to_text.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
i18n.py settings: Remove language_list_dbl_col from page_params. 2021-06-17 17:02:27 -07:00
import_realm.py markdown: Refactor out additional properties added to Message. 2021-06-24 18:14:53 -07:00
initial_password.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
integrations.py docs: Correct Big Blue Button to BigBlueButton. 2021-07-05 16:59:00 -07:00
logging_util.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
management.py settings: Remove now-unnecessary EMAIL_DELIVERER_DISABLED setting. 2021-05-18 12:39:28 -07:00
mdiff.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
mention.py refactor: Export non-markdown logic in mention.py. 2021-06-14 13:26:30 -07:00
message.py mentions: Send user group mention data to notification notices. 2021-07-05 14:23:59 -07:00
migrate.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
mobile_auth_otp.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
name_restrictions.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
narrow.py mypy: Don’t use Iterable for values iterated multiple times. 2021-04-29 16:06:17 -07:00
notification_data.py notification_data: Add `get_user_group_mentions_data` function. 2021-07-05 14:23:59 -07:00
onboarding.py onboarding: Select Message FOR UPDATE when adding reaction. 2021-06-04 08:18:17 -07:00
outgoing_http.py minor: Properly unpack `kwargs`. 2021-06-09 12:17:26 -07:00
outgoing_webhook.py outgoing_webhook: Treat "" json in response as response_not_required. 2021-05-13 08:07:38 -07:00
presence.py models: Replace __id syntax with _id where possible. 2021-04-22 14:53:00 -07:00
profile.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
push_notifications.py push_notifications: Show mentioned user group in mobile notifications. 2021-07-05 14:23:59 -07:00
pysa.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
queue.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
rate_limiter.py requirements: Upgrade Python requirements. 2021-07-05 12:23:06 -07:00
realm_description.py markdown: Refactor out additional properties added to Message. 2021-06-24 18:14:53 -07:00
realm_icon.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
realm_logo.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
redis_utils.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
remote_server.py test_push_notifications: Use responses module to mock HTTP responses. 2021-06-12 07:31:12 -07:00
request.py python: Convert deprecated Django ugettext alias to gettext. 2021-04-15 18:01:34 -07:00
response.py python: Convert deprecated Django ugettext alias to gettext. 2021-04-15 18:01:34 -07:00
rest.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
retention.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
send_email.py billing: Downgrade small realms that are behind on payments. 2021-07-02 13:19:12 -07:00
server_initialization.py audit log: Create audit log when a realm is created. 2021-04-30 09:25:11 -07:00
sessions.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
soft_deactivation.py docs: Fix capitalization mistakes. 2021-05-10 09:57:26 -07:00
sqlalchemy_utils.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
statistics.py python: Reformat with Black, except quotes. 2021-02-12 13:11:19 -08:00
storage.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
stream_subscription.py bulk_access_messages: Bulk fetch Subscription details. 2021-05-12 16:23:22 -07:00
stream_topic.py performance: Add get_subscriptions_for_send_message. 2021-05-12 08:10:57 -07:00
streams.py markdown: Refactor out additional properties added to Message. 2021-06-24 18:14:53 -07:00
subdomains.py subdomains: Extend "static" to include resources hosted on S3. 2021-06-08 15:28:10 -07:00
templates.py api docs: Replace most markdown files with a common template. 2021-06-24 10:42:08 -07:00
test_classes.py webhooks: Allow event registration using webhook_view decorator. 2021-07-05 19:10:31 -07:00
test_console_output.py requirements: Upgrade Python requirements. 2021-07-05 12:23:06 -07:00
test_data.source.txt docs: Capitalize Markdown consistently. 2020-08-11 10:23:06 -07:00
test_fixtures.py puppeteer_tests: Reset test environment after each run. 2021-03-25 12:58:36 -07:00
test_helpers.py help: Reorganize articles on editing topics. 2021-06-29 13:52:06 -07:00
test_runner.py requirements: Upgrade Python requirements. 2021-07-05 12:23:06 -07:00
tex.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
thumbnail.py requirements: Remove Thumbor. 2021-05-06 20:07:32 -07:00
timeout.py timeout: Remove unnecessary varargs support. 2021-02-15 17:05:28 -08:00
timestamp.py python: Reformat with Black, except quotes. 2021-02-12 13:11:19 -08:00
timezone.py python: Reformat with Black, except quotes. 2021-02-12 13:11:19 -08:00
topic.py message_edit: Require access to messages to move between streams. 2021-05-12 16:23:22 -07:00
topic_mutes.py topic_mutes: Filter deactivated streams from get_topic_mutes. 2021-03-30 12:11:35 -07:00
transfer.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
type_debug.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
types.py refactor: Export non-markdown logic in mention.py. 2021-06-14 13:26:30 -07:00
unminify.py unminify: Fix lookup if source map does not exist in disk. 2021-03-16 14:46:18 -07:00
upload.py upload: Deduplicate logic for public upload url creation. 2021-07-02 08:05:53 -07:00
url_encoding.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
user_agent.py python: Reformat with Black, except quotes. 2021-02-12 13:11:19 -08:00
user_groups.py python: Convert deprecated Django ugettext alias to gettext. 2021-04-15 18:01:34 -07:00
user_mutes.py cache: Use `id`s instead of `UserProfile`s for get_muting_users. 2021-06-07 13:41:37 -07:00
user_status.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
users.py left_sidebar: Migrate to handlebars. 2021-07-05 18:49:43 -07:00
utils.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
validator.py widgets: Add range checks on backend for indexes. 2021-06-29 13:40:33 -07:00
widget.py poll widget: Add server validation. 2021-06-14 17:46:16 -07:00
zcommand.py python: Convert deprecated Django ugettext alias to gettext. 2021-04-15 18:01:34 -07:00
zephyr.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00