Changes based on review feedback

This commit is contained in:
Will Hunt 2023-05-23 15:48:37 +00:00
parent aaac53ac91
commit 8f4d9c9784
2 changed files with 17 additions and 4 deletions

View file

@ -19,5 +19,6 @@ 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.
The server MUST verify that the user has permission to view the event {{< changed-in v="1.7" >}} The server MUST verify that the user
before accepting a report. reporting the event is currently joined to the room the event is
in before accepting a report.

View file

@ -29,11 +29,17 @@ securityDefinitions:
paths: paths:
"/rooms/{roomId}/report/{eventId}": "/rooms/{roomId}/report/{eventId}":
post: post:
summary: Reports an event as inappropriate. You must have permission to summary: Reports an event as inappropriate. You must be joined to the room in order
retrieve this event e.g. by being a member in the room for this event. to report an event.
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.
It may 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 may add
a random delay when generating a response.
operationId: reportContent operationId: reportContent
tags: tags:
- Reporting content - Reporting content
@ -70,6 +76,9 @@ paths:
description: The reason the content is being reported. May be blank. description: The reason the content is being reported. May be blank.
security: security:
- accessToken: [] - accessToken: []
x-changedInMatrixVersion:
1.7: |
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.
@ -80,6 +89,9 @@ paths:
404: 404:
description: |- description: |-
The event was not found or you do not have permission to read this event. The event was not found or you do not have permission to read this event.
Homeserver implementations may additionally return this error if the
reported event has been redacted.
examples: examples:
application/json: { application/json: {
"errcode": "M_NOT_FOUND", "errcode": "M_NOT_FOUND",