bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/plugins-engine/server-commands/handler.tsx

15 lines
537 B
TypeScript
Raw Normal View History

import * as React from 'react';
import PluginSaveCaptionServerCommandsManager from './caption/save/manager';
import PluginAddLocaleCaptionServerCommandsManager from './caption/add-locale/manager';
feat(plugins): server command send chat message (#20781) * feat(plugins): add chat server command and chat message type `plugin` This commit adds the required code for the plugins SDK's chat server command `CHAT_SEND_MESSAGE`, which allows plugins to send chat messages. Messages sent by plugins are identified by the message type `plugin` and belong to the user (senderID) of the client that sent it. Plugin messages are not displayed by the client itself because these messages are meant to be custom-rendered by plugins, typically by the plugin that sent them. * feat(plugins): add message metadata Plugin name and plugin custom metadata are stored in message's metadata, so plugins need it to identify messages when applying custom render. * feat(chat): removes specific code for plugin messages Removes specific akka messages, handlers and routes for plugin messages and adds metadata parameter in `GroupChatMsgFromUser`. * feat(chat): adds option parameter to mutation Adds optional parameter `metadata` to the already existing mutation `chatSendMessage` and use this mutation for plugin chat server command. * feat(chat): rendering of plugin messages This commit implements the correct rendering of plugin messages, which is: - Plugin messages with metadata attribute `custom` set to true are not rendered by the client, and are meant to be custom-rendered by plugins. - Plugin messages with metadata attribute `custom` set to false are rendered by the client as being sent by the user that triggered it. * Update sdk version to v0.0.56 * update sdk version to v0.0.57
2024-08-08 03:59:30 +08:00
import PluginSendMessageChatServerCommandsManager from './chat/send-message/manager';
const PluginServerCommandsHandler = () => (
<>
<PluginSaveCaptionServerCommandsManager />
<PluginAddLocaleCaptionServerCommandsManager />
feat(plugins): server command send chat message (#20781) * feat(plugins): add chat server command and chat message type `plugin` This commit adds the required code for the plugins SDK's chat server command `CHAT_SEND_MESSAGE`, which allows plugins to send chat messages. Messages sent by plugins are identified by the message type `plugin` and belong to the user (senderID) of the client that sent it. Plugin messages are not displayed by the client itself because these messages are meant to be custom-rendered by plugins, typically by the plugin that sent them. * feat(plugins): add message metadata Plugin name and plugin custom metadata are stored in message's metadata, so plugins need it to identify messages when applying custom render. * feat(chat): removes specific code for plugin messages Removes specific akka messages, handlers and routes for plugin messages and adds metadata parameter in `GroupChatMsgFromUser`. * feat(chat): adds option parameter to mutation Adds optional parameter `metadata` to the already existing mutation `chatSendMessage` and use this mutation for plugin chat server command. * feat(chat): rendering of plugin messages This commit implements the correct rendering of plugin messages, which is: - Plugin messages with metadata attribute `custom` set to true are not rendered by the client, and are meant to be custom-rendered by plugins. - Plugin messages with metadata attribute `custom` set to false are rendered by the client as being sent by the user that triggered it. * Update sdk version to v0.0.56 * update sdk version to v0.0.57
2024-08-08 03:59:30 +08:00
<PluginSendMessageChatServerCommandsManager />
</>
);
export default PluginServerCommandsHandler;