2
0

🐛 Fix broken skippable file upload input

This commit is contained in:
Baptiste Arnaud
2024-02-01 16:54:47 +01:00
parent 678e6d5c49
commit 3128ebd431

View File

@ -408,9 +408,8 @@ const getOutgoingEdgeId =
const parseReply = const parseReply =
(state: SessionState) => (state: SessionState) =>
async (reply: Reply, block: InputBlock): Promise<ParsedReply> => { async (reply: Reply, block: InputBlock): Promise<ParsedReply> => {
if (typeof reply !== 'string') { if (reply && typeof reply !== 'string') {
if (block.type !== InputBlockType.FILE || !reply) if (block.type !== InputBlockType.FILE) return { status: 'fail' }
return { status: 'fail' }
if (block.options?.visibility !== 'Public') { if (block.options?.visibility !== 'Public') {
return { return {
status: 'success', status: 'success',