Skip to content

docs: Server Commands section lists chat commands that do not exist in the SDK #283

Description

@imdt-claudiop

Summary

The ### Server Commands section of README.md has a duplicated structure that documents chat server commands under names that do not exist in the SDK, which leads plugin authors to call non-existent functions.

What's wrong

Two issues, both pre-existing (introduced by the v0.0.xv0.1.x merges, confirmed via git log -S):

  1. Duplicated serverCommands intro paragraph. The line below appears twice (currently README.md:854 and README.md:859), with a partial namespace list under each:

    serverCommands object: It contains all the possible commands available to the developer to interact with the BBB core server, see the ones implemented down below:

  2. The second copy documents chat commands under non-existent names. The second chat: block lists:

    • sendPublicMessage
    • sendCustomPublicMessage

    Neither name exists in the SDK. The actual exported names (in src/server-commands/chat/commands.ts) are:

    • sendPublicChatMessage (line 43)
    • sendCustomPublicChatMessage (line 69)

    A plugin author copying from the second copy will call pluginApi.serverCommands.chat.sendPublicMessage(...), which resolves to undefined and throws at runtime.

Expected

A single serverCommands intro paragraph and a single chat: block documenting the two real methods (sendPublicChatMessage, sendCustomPublicChatMessage). The first copy already has sendPublicChatMessage correct; the second copy's sendCustomPublicMessage should become sendCustomPublicChatMessage and its accompanying note about useLoadedChatMessages / useChatMessageDomElements should be preserved.

Reproduction

# Real exports
$ git grep -nE 'send(Public|Custom)' src/server-commands/chat/commands.ts
src/server-commands/chat/commands.ts:43:  sendPublicChatMessage: (
src/server-commands/chat/commands.ts:69:  sendCustomPublicChatMessage: (

# README documents names that don't exist
$ grep -nE 'send(Public|Custom)' README.md
README.md:857:    - sendPublicChatMessage: ...
README.md:863:  - sendPublicMessage: ...
README.md:865:  - sendCustomPublicMessage: ...

Context

Surfaced while documenting presentation.insertPages in #277 (which intentionally scoped only the presentation: block deduplication and left this adjacent chat-block inconsistency for a separate issue, per the maintainer's request).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions