0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-14 13:58:53 +08:00
discourse/spec/requests/api/schemas/json/user_silence_response.json
Osama Sayegh fb075f3f29
FIX: prevent silence_reason from leaking private email body (#39337)
When an admin silences a user with both a reason and an email message,
the private email body was visible publicly on user profile cards.

This applies the same fix previously used (commit 4ae1bba) for
suspension reasons: only the short reason is shown publicly, while the
full text including the email body is reserved for admin views.
2026-04-17 17:45:09 +03:00

56 lines
1.2 KiB
JSON
Vendored

{
"additionalProperties": false,
"properties": {
"silence": {
"type": "object",
"additionalProperties": false,
"properties": {
"silenced": {
"type": "boolean"
},
"silence_reason": {
"type": "string"
},
"full_silence_reason": {
"type": "string"
},
"silenced_till": {
"type": "string"
},
"silenced_at": {
"type": "string"
},
"silenced_by": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "integer"
},
"username": {
"type": "string"
},
"name": {
"type": "string"
},
"avatar_template": {
"type": "string"
}
},
"required": ["id", "username", "name", "avatar_template"]
}
},
"required": [
"silenced",
"silence_reason",
"full_silence_reason",
"silenced_till",
"silenced_at",
"silenced_by"
]
}
},
"required": [
"silence"
]
}