Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

fetch_api_key: Return `email` in json_response.

orientor8ab618268312
diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml
index 259f1fd5081..f0fdd3857ae 100644
--- a/zerver/openapi/zulip.yaml
+++ b/zerver/openapi/zulip.yaml
@@ -4794,6 +4794,7 @@ components:
- $ref: '#/components/schemas/JsonSuccess'
- required:
- api_key
+ - email
- properties:
api_key:
type: string
diff --git a/zerver/views/auth.py b/zerver/views/auth.py
index 238f8326d60..ba47660966d 100644
--- a/zerver/views/auth.py
+++ b/zerver/views/auth.py
@@ -946,7 +946,7 @@ def json_fetch_api_key(request: HttpRequest, user_profile: UserProfile,
return json_error(_("Your username or password is incorrect."))
api_key = get_api_key(user_profile)
- return json_success({"api_key": api_key})
+ return json_success({"api_key": api_key, "email": user_profile.delivery_email})
@csrf_exempt
def api_fetch_google_client_id(request: HttpRequest) -> HttpResponse: