CommunityForumPost community.forum-post@1

Generated at from openvibe-contracts v0.53.0 and openvibe-sdk v0.11.0.

Version
1.0.0
Owner
community
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/community/forum-post.v1.json

community.forum-post@1: one forum post (the opening post of a thread or a reply) as OpenVibe.Community's API shows it (server/forum/service.js shapePost). A deleted post keeps its place with no author, body, attachments or pastes.

Fields

FieldTypeRequiredDescriptionConstraints
idintegeryes
thread_idintegeryes
is_openingbooleanyes
originstringyes
authorobject | nullyesThe author projection: a person (subject and Network profile), OpenVibe AI (is_ai) or the system (is_system); null when unknown or deleted.
body_markdownstring | nullyes
body_htmlstring | nullyes
revisionintegeryes
  • minimum 1
deletedbooleanyes
created_atstring | null
  • format date-time
updated_atstring | null
  • format date-time
can_editbooleanyes
attachmentsarray of objectyes
  • maxItems 4
attachments[].media_idstringyes
attachments[].urlstringyes
attachments[].filenamestring | null
attachments[].mimestring
attachments[].size_bytesinteger
pastesarray of objectyes
  • maxItems 4
pastes[].slugstringyes
pastes[].titlestring
pastes[].languagestring
pastes[].typestring
pastes[].urlstringyes
pastes[].screenshot_urlstring | null
pastes[].linesinteger
pastes[].excerptstring | null

Examples

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

Valid: opening
{
  "attachments": [],
  "pastes": [
    {
      "slug": "k3JfQ2",
      "title": "ffmpeg restream flags",
      "language": "text",
      "type": "paste",
      "url": "/p/k3JfQ2",
      "screenshot_url": null,
      "lines": 1,
      "excerpt": "ffmpeg -re -i in.flv -c copy -f flv rtmp://example/live"
    }
  ],
  "id": 5120,
  "thread_id": 311,
  "is_opening": true,
  "origin": "user",
  "author": {
    "subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
    "username": "alice",
    "display_name": "Alice",
    "avatar_url": null,
    "profile_color": "#3b82f6"
  },
  "body_markdown": "What bitrates do you use?",
  "body_html": "<p>What bitrates do you use?</p>",
  "revision": 1,
  "deleted": false,
  "created_at": "2026-09-25T18:00:00.000Z",
  "updated_at": "2026-09-25T18:00:00.000Z",
  "can_edit": true
}
Rejected: revision-zero
{
  "id": 1,
  "thread_id": 1,
  "is_opening": false,
  "origin": "user",
  "author": null,
  "body_markdown": null,
  "body_html": null,
  "revision": 0,
  "deleted": true,
  "can_edit": false,
  "attachments": [],
  "pastes": []
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('community.forum-post@1', value);   // { valid, errors: [{ path, message }] }