ChatChannelModerationResult chat.channel-moderation-result@1

Generated at from openvibe-contracts v0.84.0 and openvibe-sdk v0.26.0.

Version
1.0.0
Owner
chat
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/chat/channel-moderation-result.v1.json

chat.channel-moderation-result@1: the answer of GET /internal/moderation/channels/:channelId on OpenVibe.Chat (capability chat.moderation.read): { ok: true, settings, moderator_ids } — one channel's moderation settings and the ids of the people who moderate it, for OpenVibe.Live's stream chat. settings carries every channel_moderation_settings column (Live's own defaults when the channel has no row yet, database.js getChannelModerationSettings); the switches are 0/1 as the table stores them. moderator_ids are Live user ids (channel_moderators.user_id), never names. A failure is { ok: false, error }; a caller without the grant gets 401 { ok: false }.

Fields

This schema has no named fields.

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: defaults
{
  "ok": true,
  "settings": {
    "channel_id": 88,
    "slow_mode_seconds": 0,
    "followers_only": 0,
    "emote_only": 0,
    "allow_anonymous": 1,
    "links_allowed": 1,
    "gifs_enabled": 1,
    "account_age_gate_hours": 0,
    "caps_percentage_limit": 0,
    "aggressive_filter": 0,
    "max_message_length": 500,
    "tts_max_length": 200,
    "slur_filter_enabled": 0,
    "slur_filter_use_builtin": 1,
    "slur_filter_terms": "",
    "slur_filter_regexes": "",
    "slur_filter_nudge_message": "",
    "slur_filter_disabled_categories": "[]",
    "ip_approval_mode": 0,
    "soundboard_enabled": 1,
    "soundboard_allow_pitch": 1,
    "soundboard_allow_speed": 1,
    "soundboard_banned_ids": "",
    "viewer_auto_delete_enabled": 1,
    "viewer_delete_all_enabled": 1,
    "custom_emotes_enabled": 1,
    "custom_sounds_enabled": 1,
    "max_sound_seconds": 10,
    "uploads_mods_only": 0,
    "mods_can_edit_about": 0,
    "emote_scale": 100,
    "emote_size_min": 50,
    "emote_size_max": 200,
    "sounds_mods_only": 0,
    "sound_min_speed": 0.5,
    "sound_max_speed": 3,
    "sound_min_pitch_cents": -1200,
    "sound_max_pitch_cents": 1200,
    "sub_only": 0
  },
  "moderator_ids": []
}
Valid: error
{
  "ok": false,
  "error": "channel not found"
}
Valid: tuned
{
  "ok": true,
  "settings": {
    "channel_id": 41,
    "slow_mode_seconds": 30,
    "followers_only": 1,
    "emote_only": 0,
    "allow_anonymous": 1,
    "links_allowed": 0,
    "gifs_enabled": 1,
    "account_age_gate_hours": 24,
    "caps_percentage_limit": 40,
    "aggressive_filter": 0,
    "max_message_length": 400,
    "tts_max_length": 200,
    "slur_filter_enabled": 1,
    "slur_filter_use_builtin": 1,
    "slur_filter_terms": "badword,otherword",
    "slur_filter_regexes": "^https?://",
    "slur_filter_nudge_message": "Keep it kind here.",
    "slur_filter_disabled_categories": "[\"slurs\"]",
    "ip_approval_mode": 1,
    "soundboard_enabled": 1,
    "soundboard_allow_pitch": 1,
    "soundboard_allow_speed": 1,
    "soundboard_banned_ids": "3,9",
    "viewer_auto_delete_enabled": 1,
    "viewer_delete_all_enabled": 0,
    "custom_emotes_enabled": 1,
    "custom_sounds_enabled": 1,
    "max_sound_seconds": 10,
    "uploads_mods_only": 1,
    "mods_can_edit_about": 0,
    "emote_scale": 120,
    "emote_size_min": 50,
    "emote_size_max": 200,
    "sounds_mods_only": 0,
    "sound_min_speed": 0.5,
    "sound_max_speed": 3,
    "sound_min_pitch_cents": -1200,
    "sound_max_pitch_cents": 1200,
    "sub_only": 0,
    "donation_sound_url": "sounds/don.mp3",
    "donation_sound_mime": "audio/mpeg",
    "goal_sound_url": null,
    "goal_sound_mime": null,
    "updated_at": "2026-09-27T18:04:11Z"
  },
  "moderator_ids": [
    12,
    19
  ]
}
Rejected: no-columns
{
  "ok": true,
  "settings": {},
  "moderator_ids": []
}
Rejected: not-a-switch
{
  "ok": true,
  "settings": {
    "channel_id": 41,
    "slow_mode_seconds": 0,
    "followers_only": 2
  },
  "moderator_ids": []
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('chat.channel-moderation-result@1', value);   // { valid, errors: [{ path, message }] }