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.x → v0.1.x merges, confirmed via git log -S):
-
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:
-
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).
Summary
The
### Server Commandssection ofREADME.mdhas 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.x→v0.1.xmerges, confirmed viagit log -S):Duplicated
serverCommandsintro paragraph. The line below appears twice (currentlyREADME.md:854andREADME.md:859), with a partial namespace list under each:The second copy documents chat commands under non-existent names. The second
chat:block lists:sendPublicMessagesendCustomPublicMessageNeither 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 toundefinedand throws at runtime.Expected
A single
serverCommandsintro paragraph and a singlechat:block documenting the two real methods (sendPublicChatMessage,sendCustomPublicChatMessage). The first copy already hassendPublicChatMessagecorrect; the second copy'ssendCustomPublicMessageshould becomesendCustomPublicChatMessageand its accompanying note aboutuseLoadedChatMessages/useChatMessageDomElementsshould be preserved.Reproduction
Context
Surfaced while documenting
presentation.insertPagesin #277 (which intentionally scoped only thepresentation:block deduplication and left this adjacent chat-block inconsistency for a separate issue, per the maintainer's request).