Overview
Returns a function that allows a space moderator to take action on a chat message report. Available actions are: remove the message, ban the message’s author from the space, or dismiss the report.Requires the authenticated user to have
admin or moderator role in the target space.ban-user here is space-scoped — it bans the message’s author from the space and the child spaces where they are an active member, and ends their membership of those spaces’ chats. Project-wide suspension is a separate, dashboard-only action; a space
moderator cannot suspend a user across the whole project.Usage Example
Parameters
One or more actions to take:
remove-message— Removes the message.ban-user— Bans the message’s author from the space and the child spaces where they are an active member, and ends their membership of those spaces’ chats (reasonis optional;userIdis optional and must be the author if sent).dismiss— Marks the report as dismissed.
Optional. The server bans the author of the reported message; if sent, this must be that author.
The moderator a service key acts for. The request then has exactly that moderator’s permissions.
Returns
ReturnsPromise<{ message: string; code: string }>.
Notes
- This is the chat equivalent of
useHandleSpaceEntityReportanduseHandleSpaceCommentReport. - Message reports are created with
useCreateReportusingtype: "message". - To fetch pending reports, use
useFetchModeratedReports.

