From 39619cdf3b9e3412277670b41d51ad0dbe7a32cf Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Sat, 8 Aug 2026 21:55:21 -0700 Subject: [PATCH 1/2] docs(plugins): document namespaced emitted events --- docs/plugins/testing.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/plugins/testing.mdx b/docs/plugins/testing.mdx index f03da463f5..faf5561799 100644 --- a/docs/plugins/testing.mdx +++ b/docs/plugins/testing.mdx @@ -217,7 +217,7 @@ The scenario's top-level `expect` checks what happened across the whole run: | `bannedIPs` | List of IPs banned via `owncast.users.banIP` | | `uploads` | List of `{ name, body?, bodyBase64? }` from `owncast.storage.upload`. `name` is always checked. Non-empty `body` values compare text. Present `bodyBase64` values compare exact decoded bytes | | `videoConfigWrites` | List of partial configs applied via `owncast.videoConfig.write()` | -| `emits` | List of `{ eventType, payload }` for `owncast.events.emit` calls | +| `emits` | List of `{ eventType, payload }` for `owncast.events.emit` calls. `eventType` is the dispatched name, so it carries your plugin's slug prefix | | `commands` | List of `{ name, prefix?, description?, usage?, aliases?, modOnly, caseSensitive, cooldownMs }` chat-command registrations, matched by `name` in any order (`prefix`, `description`, `usage`, and `aliases` are checked only when set) | | `kv` | Partial map of plugin-config state after the scenario | | `httpRequests` | List of `{ url, method?, body? }` outbound `owncast.http.fetch` calls. `url` is an exact match, an omitted `method` matches any, an omitted `body` skips the check | @@ -274,7 +274,7 @@ Example exercising several: "expect": { "chatSends": ["alice: 1 message", "alice: 2 messages"], "kv": { "count:u-alice": "2" }, - "emits": [{ "eventType": "milestone.reached", "payload": { "user": "alice", "count": 2 } }] + "emits": [{ "eventType": "my-plugin.milestone.reached", "payload": { "user": "alice", "count": 2 } }] } } ``` From 04c4af8abb2dd81fb59dfe8ac9bdb97aa742ae51 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Sat, 8 Aug 2026 22:18:47 -0700 Subject: [PATCH 2/2] docs(plugins): note the reserved core-event rejection on emit --- docs/plugins/apis.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/plugins/apis.mdx b/docs/plugins/apis.mdx index d4ae6dfe28..9b263fdd05 100644 --- a/docs/plugins/apis.mdx +++ b/docs/plugins/apis.mdx @@ -585,6 +585,9 @@ Emit a custom event that other plugins can subscribe to. The host prefixes Pass an event-name suffix. Dots are allowed for hierarchy. Subscribers use the fully qualified `.` name in their custom-event handler: see the [handlers reference](/docs/plugins/events#plugin-to-plugin-events). +If the composed name would equal a built-in Owncast event (a plugin slugged +`chat` emitting `message.received`), the host drops the emit instead of +delivering a forged core event.