mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
api: Add avatar URL to the GET /profile endpoint.
This endpoint is legacy in a lot of ways, but it seems reasonable that it should have these data.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Get profile
|
||||
|
||||
Get the profile of the user/bot that requests this endpoint.
|
||||
Get basic data about the user/bot that requests this endpoint.
|
||||
|
||||
`GET {{ api_url }}/v1/users/me`
|
||||
|
||||
|
||||
@@ -1188,6 +1188,10 @@ paths:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/JsonSuccess'
|
||||
- properties:
|
||||
avatar_url:
|
||||
type: string
|
||||
description: "URL for the user's avatar"
|
||||
example: "x"
|
||||
client_id:
|
||||
type: string
|
||||
description: NA
|
||||
@@ -1226,6 +1230,7 @@ paths:
|
||||
example: 1
|
||||
- example:
|
||||
{
|
||||
"avatar_url": "https://secure.gravatar.com/avatar/af4f06322c177ef4e1e9b2c424986b54?d=identicon&version=1",
|
||||
"client_id": "74c768b081076fdb3c4326256c17467e",
|
||||
"email": "iago@zulip.com",
|
||||
"full_name": "Iago",
|
||||
|
||||
@@ -518,6 +518,7 @@ def get_profile_backend(request: HttpRequest, user_profile: UserProfile) -> Http
|
||||
client_id = generate_client_id(),
|
||||
max_message_id = -1,
|
||||
user_id = user_profile.id,
|
||||
avatar_url = avatar_url(user_profile),
|
||||
full_name = user_profile.full_name,
|
||||
email = user_profile.email,
|
||||
is_bot = user_profile.is_bot,
|
||||
|
||||
Reference in New Issue
Block a user