Type the paarrot api, WebKit globals, and plugin command content. [skip build]
Checks / checks (push) Successful in 2m6s
Trigger cinny-mobile / dispatch (push) Successful in 2s

This commit is contained in:
2026-11-02 02:22:02 +11:00
parent b36335cde9
commit 6c8a085ae1
4 changed files with 29 additions and 18 deletions
+3 -2
View File
@@ -10,6 +10,7 @@ import React, {
import { useAtom, useAtomValue } from 'jotai';
import { isKeyHotkey } from 'is-hotkey';
import { EventType, IContent, MsgType, RelationType, Room } from 'matrix-js-sdk';
import { RoomMessageEventContent } from 'matrix-js-sdk/lib/types';
import { Transforms, Editor } from 'slate';
import {
Box,
@@ -405,11 +406,11 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
const result = await pluginRegistry.executeCommand(commandName, plainText, roomId);
if (result) {
// If command returns text, send it as a message
const content: IContent = {
const content: RoomMessageEventContent = {
msgtype: MsgType.Text,
body: result,
};
mx.sendMessage(roomId, content as any);
mx.sendMessage(roomId, content);
}
} catch (err) {
console.error(`[RoomInput] Plugin command /${commandName} failed:`, err);