(wip): fix chat crypto
Some checks failed
/ build-web (push) Successful in 7m21s
/ build-desktop (linux) (push) Failing after 7m49s
/ build-mobile (push) Successful in 20m5s
/ release (push) Has been skipped

This commit is contained in:
Alois 2026-07-06 17:52:41 +02:00
commit 8ddc8db536
6 changed files with 195 additions and 82 deletions

View file

@ -111,7 +111,9 @@ function validateResponse<T extends keyof Schemas & string>(
return message as ProtocolMessage<T>;
}
const schema = schemas[type]?.response;
const schema =
schemas[message.type as keyof Schemas & string]?.response ??
schemas[type]?.response;
if (!schema) {
return message as ProtocolMessage<T>;
}
@ -574,15 +576,7 @@ export function Provider(props: {
subscribePush,
});
}
}, [
connected,
identified,
mtpUrl,
send,
subscribe,
subscribePush,
mtpRef,
]);
}, [connected, identified, mtpUrl, send, subscribe, subscribePush, mtpRef]);
const sendQueued: BoundSendFn = useMemo(
() => async (type, data, options) => {