openvibers/openvibe.network Commits

Network: the streamer-pastes proxy comment describes the Community chain (#144)

OP OpenVibers committed 11 Oct 2026 · 076f8db970 · 1 file, +4 −9

* Network: POST /internal/events/stream-live is gone (go-lives arrive as live.stream.started only, C-85)

Compatibility register C-85, the last piece: `POST /internal/events/stream-live` goes. It was Live's direct go-live call: follower ids in the body, a legacy fallback to the old `follows` table through `linked_accounts`, Discord and bulk notifications.

- **Why nothing calls it:** Live has called it only while `GOLIVE_NOTIFY` was unset, which has not been the case since 2026-10-10. Live#93 deletes the call, and this PR ships after that deploy. Go-lives reach Network only as `live.stream.started` through Events, and the consumer (#142, always on) tells followers from Network's own `user_follows`.
- **Deleted:** the route and its handler in `server/internal/routes.js`.
- **Kept:** `stream-live.js` keeps the announcement window, the notification shape and the channel URLs the consumer uses.
- **Docs:** `stream-live.js`, `events-consumer.js` and the README describe the consumer as the only path.
- **Tests:**
  - `principals.test.js` asserts the route answers 404 now; it checked the guard before.
  - `events-consumer.test.js` keeps its window checks, with the comment updated.

`ov test`: principals and events-consumer green.

* Network: the streamer-pastes proxy comment describes the Community chain

The comment above `/api/admin/streamer-pastes` still described a chain ending at Media's read-only paste API and a pending `PASTES_AUTHORITY=community` move. That move happened at Wave 5, and the switch is gone.

What the proxy reaches today:
- **Network → Live:** `/api/admin/streamer-pastes/:rest` goes to openvibe.live `/api/pastes/:rest`.
- **Live → Community:** Live checks its admin role, then forwards to OpenVibe.Community's `/api/pastes/:rest` as Live's service.
- **Coverage:** Community serves all three calls the admin Pastes tab makes: `GET /config`, `GET /admin/stats` (`{stats:{total,textPastes,screenshots,forks}}`, the shape the tab reads) and `DELETE /admin/forks`.

This comment was the last thing naming Media as the end of the chain. Only the comment changes, so this PR has no behaviour change. `node --check` passes.

Changes

ddiff --git a/server/index.js b/server/index.js
iindex a795d010..134be007 100644
---- a/server/index.js
++++ b/server/index.js
@@@ -779,15 +779,10 @@ app.use('/api/admin/streamer-funds', requireAuth, (req, res, next) => {
return await proxyJsonRequest(req, res, `${OPENVIBELIVE_INTERNAL}/api/funds${req.url}`, 'Funds proxy error');
});
--// Pastes (retiring) — this proxy is a surviving caller of OpenVibe.Media's read-only paste API, so
--// Media cannot retire that API's router and GET handlers while it exists. The chain reads
--// Network → Live → Media: /api/admin/streamer-pastes/:rest → openvibe.live /api/pastes/:rest, whose
--// GETs forward 1:1 to openvibe.media /api/v1/live/pastes/:rest. The admin panel's Pastes tab
--// (public/admin.html) is the consumer: it still reads GET /config (the last live-called paste GET)
--// and /admin/stats (whose Media route is already gone), and its DELETE /admin/forks answers Media's
--// 410 pastes.moved. Retiring Media's paste GETs is conditional on this proxy being retired or
--// repointed first — Live moves the whole chain to Community with PASTES_AUTHORITY=community, and
--// this proxy should follow that move (or go with the tab) rather than keep reading the retired API.
++// Pastes — the admin panel's Pastes tab (public/js/admin/content.js) reads GET /config and /admin/stats
++// and calls DELETE /admin/forks through this proxy. The chain is Network → Live → Community:
++// /api/admin/streamer-pastes/:rest → openvibe.live /api/pastes/:rest, which checks Live's admin role and
++// forwards to OpenVibe.Community's /api/pastes/:rest as Live's service (Community owns pastes).
app.use('/api/admin/streamer-pastes', requireAuth, (req, res, next) => {
if (!req.user || req.user.role !== 'admin') {
return res.status(403).json({ error: 'Admin access required' });