Let users pick their Gravatar as their profile image (SCR-1)
CI / validate-monitoring (push) Successful in 8s
CI / lint (push) Successful in 13s
CI / federation-interop (push) Successful in 1m42s
CI / test (push) Successful in 5m46s
CI / images (push) Skipped
CI / assets (push) Skipped
CI / python-package (push) Skipped
CI / trigger-deploy (push) Skipped
CI / notify (push) Successful in 7s

Opt-in per user and gated by AVATAR_GRAVATAR_ENABLED. The server fetches the image by
the SHA-256 of the account email and caches it with the uploads, so browsers never
contact Gravatar.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
mattandClaude Sonnet 5.5 committed 2026-10-13 11:41:32 +01:00
1 parent c55a6596d0
commit 9243fe4d3f
8 files changed
+328 -4

No files matched your search

+65 -1
View File
@@ -2081,6 +2081,65 @@
]
}
},
"/api/v1/me/avatar/gravatar": {
"post": {
"responses": {
"502": {
"description": "Gravatar couldn't be reached",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Gravatar is off, or has no image for you",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
}
},
"401": {
"description": "Not authenticated",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"default": {
"$ref": "#/components/responses/DEFAULT_ERROR"
}
},
"summary": "Use your Gravatar as your profile image",
"description": "The server fetches the image for your account email from Gravatar (sending it a hash\nof the address) and keeps a copy. Call again to refresh it. Only available when the\nserver's admin has enabled it; see `gravatar_enabled` on `/auth/me`.",
"tags": [
"Avatar"
],
"security": [
{
"bearerAuth": []
}
]
}
},
"/healthz": {
"get": {
"responses": {
@@ -3958,7 +4017,7 @@
},
{
"name": "Avatar",
"description": "Your profile image: upload one, or remove it."
"description": "Your profile image: upload one, use your Gravatar (if this server allows it), or remove it."
},
{
"name": "Health",
@@ -4119,6 +4178,11 @@
"format": "date-time",
"readOnly": true,
"description": "When it last changed"
},
"gravatar_enabled": {
"readOnly": true,
"type": "boolean",
"description": "Whether this server offers Gravatar"
}
},
"additionalProperties": false