diff --git a/zerver/lib/webhooks/common.py b/zerver/lib/webhooks/common.py index a09f601047..17e2b44095 100644 --- a/zerver/lib/webhooks/common.py +++ b/zerver/lib/webhooks/common.py @@ -130,10 +130,10 @@ def check_send_webhook_message( else: check_send_stream_message(user_profile, client, stream, topic, body) except StreamDoesNotExistError: - # A PM will be sent to the bot_owner by check_message, notifying - # that the webhook bot just tried to send a message to a non-existent - # stream, so we don't need to re-raise it since it clutters up - # webhook-errors.log + # A direct message will be sent to the bot_owner by check_message, + # notifying that the webhook bot just tried to send a message to a + # non-existent stream, so we don't need to re-raise it since it + # clutters up webhook-errors.log pass diff --git a/zerver/webhooks/gosquared/view.py b/zerver/webhooks/gosquared/view.py index 857f695e08..a15db42d04 100644 --- a/zerver/webhooks/gosquared/view.py +++ b/zerver/webhooks/gosquared/view.py @@ -47,7 +47,7 @@ def api_gosquared_webhook( # Live chat message event elif payload.get("message") is not None and payload.get("person") is not None: - # Only support non-private messages + # Only support non-direct messages if not payload["message"]["private"].tame(check_bool): session_title = payload["message"]["session"]["title"].tame(check_string) topic = f"Live chat session - {session_title}" diff --git a/zerver/webhooks/helloworld/tests.py b/zerver/webhooks/helloworld/tests.py index cf237b0093..ff2e8179b2 100644 --- a/zerver/webhooks/helloworld/tests.py +++ b/zerver/webhooks/helloworld/tests.py @@ -7,7 +7,7 @@ from zerver.models import get_realm, get_system_bot class HelloWorldHookTests(WebhookTestCase): STREAM_NAME = "test" URL_TEMPLATE = "/api/v1/external/helloworld?&api_key={api_key}&stream={stream}" - PM_URL_TEMPLATE = "/api/v1/external/helloworld?&api_key={api_key}" + DIRECT_MESSAGE_URL_TEMPLATE = "/api/v1/external/helloworld?&api_key={api_key}" WEBHOOK_DIR_NAME = "helloworld" # Note: Include a test function per each distinct message condition your integration supports @@ -37,7 +37,7 @@ class HelloWorldHookTests(WebhookTestCase): def test_pm_to_bot_owner(self) -> None: # Note that this is really just a test for check_send_webhook_message - self.URL_TEMPLATE = self.PM_URL_TEMPLATE + self.URL_TEMPLATE = self.DIRECT_MESSAGE_URL_TEMPLATE self.url = self.build_webhook_url() expected_message = "Hello! I am happy to be here! :smile:\nThe Wikipedia featured article for today is **[Goodbye](https://en.wikipedia.org/wiki/Goodbye)**" diff --git a/zerver/webhooks/teamcity/doc.md b/zerver/webhooks/teamcity/doc.md index 35e0ae228d..47f83ecbca 100644 --- a/zerver/webhooks/teamcity/doc.md +++ b/zerver/webhooks/teamcity/doc.md @@ -34,7 +34,7 @@ Get Zulip notifications for your TeamCity builds! When a user runs a personal build, if Zulip can map their TeamCity username to a Zulip user (by comparing it with the Zulip user's email -address or full name), that Zulip user will receive a private -message with the result of their personal build. +address or full name), that Zulip user will receive a direct message +with the result of their personal build. ![](/static/images/integrations/teamcity/002.png) diff --git a/zerver/webhooks/teamcity/view.py b/zerver/webhooks/teamcity/view.py index 29eee9ff44..d2a08c7dad 100644 --- a/zerver/webhooks/teamcity/view.py +++ b/zerver/webhooks/teamcity/view.py @@ -109,7 +109,7 @@ def api_teamcity_webhook( else: topic = build_name - # Check if this is a personal build, and if so try to private message the user who triggered it. + # Check if this is a personal build, and if so try to direct message the user who triggered it. if ( get_teamcity_property_value(message["teamcityProperties"], "env.BUILD_IS_PERSONAL") == "true"