MediaAvatarAdoptResult media.avatar-adopt-result@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- media
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/media/avatar-adopt-result.v1.json
media.avatar-adopt-result@1: the answer of POST /internal/avatar-adopt on OpenVibe.Media: { ok: true, ref }, the active reference the slot now holds. A reference is released, never deleted, so Media keeps the history of the objects a person's picture moved through.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
ok | const | yes |
| |
ref | object | yes | ||
ref.id | integer | string | |||
ref.object_id | string | yes | The avatar object (med_…) the slot points at. |
|
ref.subject | string | null | The person (usr_…) when the product knows it; Media refuses an object owned by someone else. |
| |
ref.product | string | yes | The product whose profile holds the picture: network (users.avatar_url) or live (its own users.avatar_url, a channel banner). |
|
ref.ref | string | yes | The slot in that product: the person's id there, or the id and the slot (for example 42:banner). |
|
ref.created_at | string | yes | When the slot started pointing at the object. | |
ref.released_at | string | null | Always null in this answer: the reference is the active one. |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: active
{
"ok": true,
"ref": {
"id": 7,
"object_id": "med_01JC5Z8K2Q4X7V9B3N6M1R0T2Y",
"subject": null,
"product": "network",
"ref": "42",
"created_at": "2026-11-06 22:40:00",
"released_at": null
}
}Rejected: no-ref
{
"ok": true
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('media.avatar-adopt-result@1', value); // { valid, errors: [{ path, message }] }