fix: await mx.sendMessage()
This commit is contained in:
parent
027bfdadeb
commit
db4ac6a2c2
1 changed files with 5 additions and 3 deletions
|
@ -237,10 +237,12 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
|
|||
});
|
||||
handleCancelUpload(uploads);
|
||||
const contents = fulfilledPromiseSettledResult(await Promise.allSettled(contentsPromises));
|
||||
contents.forEach((content) => mx.sendMessage(roomId, content));
|
||||
for (const content of contents) {
|
||||
await mx.sendMessage(roomId, content);
|
||||
}
|
||||
};
|
||||
|
||||
const submit = useCallback(() => {
|
||||
const submit = useCallback(async () => {
|
||||
uploadBoardHandlers.current?.handleSend();
|
||||
|
||||
const commandName = getBeginCommand(editor);
|
||||
|
@ -309,7 +311,7 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
|
|||
},
|
||||
};
|
||||
}
|
||||
mx.sendMessage(roomId, content);
|
||||
await mx.sendMessage(roomId, content);
|
||||
resetEditor(editor);
|
||||
resetEditorHistory(editor);
|
||||
setReplyDraft(undefined);
|
||||
|
|
Loading…
Reference in a new issue