Type the paarrot api, WebKit globals, and plugin command content. [skip build]
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user