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 -5
View File
@@ -69,10 +69,8 @@ function checkWebRTCSupport(): { supported: boolean; details: Record<string, unk
);
// Check WebKit-specific APIs
details.hasWebkitGetUserMedia = !!(
navigator.getUserMedia || (navigator as any).webkitGetUserMedia
);
details.hasWebkitRTCPeerConnection = !!(window as any).webkitRTCPeerConnection;
details.hasWebkitGetUserMedia = !!(navigator.getUserMedia || navigator.webkitGetUserMedia);
details.hasWebkitRTCPeerConnection = !!window.webkitRTCPeerConnection;
// Check if mediaDevices API exists
details.hasMediaDevices = !!navigator.mediaDevices;
@@ -83,7 +81,7 @@ function checkWebRTCSupport(): { supported: boolean; details: Record<string, unk
const supported = !!(
navigator.mediaDevices &&
navigator.mediaDevices.getUserMedia &&
(window.RTCPeerConnection || (window as any).webkitRTCPeerConnection)
(window.RTCPeerConnection || window.webkitRTCPeerConnection)
);
return { supported, details };
+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);