handleSpaceReport
Handles a report filed in a space, whatever was reported: an entity, a comment or a chat message in the space’s conversation (PATCH /spaces/:spaceId/reports/:reportId). The server reads the reported content and its author from the report, so the call names neither. See Handle Report for every rule and error.
One or more actions to apply. Which ones a report takes depends on what was reported:
- an entity report:
"remove-entity","ban-user","dismiss" - a comment report:
"remove-comment","ban-user","dismiss" - a chat message report:
"remove-message","ban-user","dismiss"
400 report/invalid-actions, and "dismiss" can’t be combined with other actions. "ban-user" bans the author of the reported content from the space and requires reason; it is refused with 400 report/cannot-ban-self when that author is the logged-in user.The resolution note stored on the report, up to 1000 characters. Required for every report type; without it (or with only whitespace) the request is refused with
400 report/missing-fields.Reason for the ban, kept in the space’s ban log, up to 1000 characters. Required when
actions includes "ban-user".Promise<void>. It resolves with no value once the actions are applied.
SpaceReportAction is "remove-entity" | "remove-comment" | "remove-message" | "ban-user" | "dismiss".
moderateSpaceEntity
Approves or removes an entity in a space. A draft can’t be moderated: it answers404 moderation/entity-not-found, like a missing entity.
Promise<{ moderationStatus: "approved" | "removed" | null }>: the status after the request. Content its owner deleted takes no moderation change and answers with its existing status, which can be null.
setSpaceEntityNsfw
Sets the NSFW own-flag on an entity within a space — including other users’ entities. Separate frommoderateSpaceEntity: it labels the entity (nsfw), it does not approve/remove it. Requires the acting user to be an admin or moderator of the space. A draft can’t be flagged: it answers 404 moderation/entity-not-found, like a missing entity.
Promise<{ nsfw: boolean }>
moderateSpaceComment
Approves or removes a comment in a space.Promise<{ moderationStatus: "approved" | "removed" | null }>: the status after the request. Content its owner deleted takes no moderation change and answers with its existing status, which can be null.
moderateSpaceChatMessage
Removes a chat message in a space conversation.The moderation action. Chat messages are never held for approval, so
"remove" is the only value.Promise<{ moderationStatus: "removed" | null }>: null for a message its author deleted (and nobody removed), which is left as it was.
fetchManyRules
Fetches all rules for a space. The rules of a space the logged-in user can’t see are answered404 space/not-found.
Promise<FetchManyRulesResponse>
fetchRule
Fetches a single rule by ID. A rule of a space the logged-in user can’t see is answered404 space/not-found.
Promise<Rule>
createRule
Creates a rule in a space.Promise<Rule>
updateRule
Updates a rule’s title and/or description.Promise<Rule>
deleteRule
Deletes a rule.Promise<void>. It resolves with no value once the rule is deleted.
reorderRules
Reorders a space’s rules.Promise<Rule[]>
