Add spec for MSC2449: Require users to have visibility on an event when submitting reports (#1517)
* Add MSC2249 support * changelog * Add a line on verification * Changes based on review feedback * Apply suggestions from code review Co-authored-by: Travis Ralston <travpc@gmail.com> * move tags field to the bottom of report_content.yaml * fix duplicated content now how did that happen * fix up the 404 response schema it wasn't displaying correctly in the rendered spec otherwise * remove erroneous schema reference * 1.7 -> 1.8 Co-authored-by: Travis Ralston <travpc@gmail.com> --------- Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Co-authored-by: Travis Ralston <travpc@gmail.com> Co-authored-by: Andrew Morgan <andrew@amorgan.xyz>
This commit is contained in:
parent
05ca6c7392
commit
1b69e03793
3 changed files with 34 additions and 2 deletions
1
changelogs/client_server/newsfragments/1517.feature
Normal file
1
changelogs/client_server/newsfragments/1517.feature
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Require callers to be joined to the room to report its events, as per [MSC2249](https://github.com/matrix-org/matrix-spec-proposals/pull/2249).
|
|
@ -18,3 +18,7 @@ Servers are free to handle the reported content however they desire.
|
||||||
This may be a dedicated room to alert server administrators to the
|
This may be a dedicated room to alert server administrators to the
|
||||||
reported content or some other mechanism for notifying the appropriate
|
reported content or some other mechanism for notifying the appropriate
|
||||||
people.
|
people.
|
||||||
|
|
||||||
|
{{< changed-in v="1.8" >}} The server MUST verify that the user
|
||||||
|
reporting the event is currently joined to the room the event is
|
||||||
|
in before accepting a report.
|
||||||
|
|
|
@ -18,10 +18,17 @@ info:
|
||||||
paths:
|
paths:
|
||||||
"/rooms/{roomId}/report/{eventId}":
|
"/rooms/{roomId}/report/{eventId}":
|
||||||
post:
|
post:
|
||||||
summary: Reports an event as inappropriate.
|
summary: Report an event in a joined room as inappropriate.
|
||||||
description: |-
|
description: |-
|
||||||
Reports an event as inappropriate to the server, which may then notify
|
Reports an event as inappropriate to the server, which may then notify
|
||||||
the appropriate people.
|
the appropriate people. The caller must be joined to the room to report
|
||||||
|
it.
|
||||||
|
|
||||||
|
It might be possible for clients to deduce whether an event exists by
|
||||||
|
timing the response, as only a report for an event that does exist
|
||||||
|
will require the homeserver to check whether a user is joined to
|
||||||
|
the room. To combat this, homeserver implementations should add
|
||||||
|
a random delay when generating a response.
|
||||||
operationId: reportContent
|
operationId: reportContent
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
|
@ -59,6 +66,9 @@ paths:
|
||||||
required: true
|
required: true
|
||||||
security:
|
security:
|
||||||
- accessToken: []
|
- accessToken: []
|
||||||
|
x-changedInMatrixVersion:
|
||||||
|
1.8: |
|
||||||
|
This endpoint now requires the user to be joined to the room.
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: The event has been reported successfully.
|
description: The event has been reported successfully.
|
||||||
|
@ -69,6 +79,23 @@ paths:
|
||||||
examples:
|
examples:
|
||||||
response:
|
response:
|
||||||
value: {}
|
value: {}
|
||||||
|
"404":
|
||||||
|
description: |-
|
||||||
|
The event was not found or you are not joined to the room where the
|
||||||
|
event resides.
|
||||||
|
|
||||||
|
Homeserver implementations can additionally return this error if the
|
||||||
|
reported event has been redacted.
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: definitions/errors/error.yaml
|
||||||
|
examples:
|
||||||
|
response:
|
||||||
|
value: {
|
||||||
|
"errcode": "M_NOT_FOUND",
|
||||||
|
"error": "The event was not found or you are not joined to the room."
|
||||||
|
}
|
||||||
tags:
|
tags:
|
||||||
- Reporting content
|
- Reporting content
|
||||||
servers:
|
servers:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue