mirror of https://github.com/zulip/zulip.git
webhooks/teamcity: Migrate to check_send_private_message.
This commit is contained in:
parent
763437cc9c
commit
d20b57c20d
|
@ -5,7 +5,7 @@ from django.http import HttpRequest, HttpResponse
|
|||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from zerver.models import UserProfile, Realm
|
||||
from zerver.lib.actions import check_send_message, check_send_stream_message
|
||||
from zerver.lib.actions import check_send_private_message, check_send_stream_message
|
||||
from zerver.lib.response import json_success, json_error
|
||||
from zerver.decorator import REQ, has_request_variables, api_key_only_webhook_view
|
||||
|
||||
|
@ -93,7 +93,8 @@ def api_teamcity_webhook(request, user_profile, payload=REQ(argument_type='body'
|
|||
return json_success()
|
||||
|
||||
body = "Your personal build of " + body
|
||||
check_send_message(user_profile, request.client, 'private', [teamcity_user.email], topic, body)
|
||||
check_send_private_message(user_profile, request.client, teamcity_user, body)
|
||||
|
||||
return json_success()
|
||||
|
||||
check_send_stream_message(user_profile, request.client, stream, topic, body)
|
||||
|
|
Loading…
Reference in New Issue