fix: await mx.sendMessage()
This commit is contained in:
parent
36a5eb3c47
commit
b011a4413a
1 changed files with 5 additions and 3 deletions
|
@ -232,10 +232,12 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
|
||||||
});
|
});
|
||||||
handleCancelUpload(uploads);
|
handleCancelUpload(uploads);
|
||||||
const contents = fulfilledPromiseSettledResult(await Promise.allSettled(contentsPromises));
|
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();
|
uploadBoardHandlers.current?.handleSend();
|
||||||
|
|
||||||
const commandName = getBeginCommand(editor);
|
const commandName = getBeginCommand(editor);
|
||||||
|
@ -304,7 +306,7 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
mx.sendMessage(roomId, content);
|
await mx.sendMessage(roomId, content);
|
||||||
resetEditor(editor);
|
resetEditor(editor);
|
||||||
resetEditorHistory(editor);
|
resetEditorHistory(editor);
|
||||||
setReplyDraft();
|
setReplyDraft();
|
||||||
|
|
Loading…
Reference in a new issue