Ban a user from a specific chat, preventing them from rejoining.
Bans a user from a chat. The ban is stored in Redis with an optional TTL. If no duration is provided, the ban is permanent until lifted manually. Banning also removes the user from the chat’s DB membership, so they cannot rejoin a private chat via stored membership. Broadcasts aDocumentation Index
Fetch the complete documentation index at: https://docs.7331.org/llms.txt
Use this file to discover all available pages before exploring further.
user:banned event to all clients in the chat — the banned user’s client is expected to leave on receipt. For an immediate server-side disconnect (while the user is online), use the room:kick Socket.IO event with ban: true instead.
Authorization: Chat owner can always ban. For private chats, Admin+ can also ban. For public/official chats, any user who outranks the chat owner (via permission hierarchy) can ban. Hierarchy is also enforced against the target — you cannot ban someone at or above your permission level.
0 for permanent. Maximum: 2592000 (30 days).true if the user was banned.room:kick Socket.IO event with "ban": true. The REST endpoint is best for banning offline users or setting a ban without an immediate kick. To lift a ban, use Unban User from Chat.