(feat): migrate bun to pnpm
Some checks failed
/ build-web (push) Failing after 3m41s
/ build-desktop (linux) (push) Failing after 3m43s
/ build-mobile (push) Failing after 6m33s
/ release (push) Has been skipped

(feat): some mtp stuff
(wip): electron app tray
This commit is contained in:
Alois 2026-07-04 01:18:54 +02:00
commit 82a483d7ab
39 changed files with 10109 additions and 2429 deletions

View file

@ -331,9 +331,16 @@ export function Provider(props: {
setIdentifying(false);
await MTPClient.init();
const rawOmikronData = await fetch(mtpUrl ?? "").then((res) =>
codec.decode(res.arrayBuffer()),
log(2, "mtp", "purple", "Fetching Omikron data.");
const omikronData = await fetch(
`${mtpUrl}api/get/omikron/${await load("user_id")}`,
).then(async (res) =>
codec.decode(new Uint8Array(await res.arrayBuffer())),
);
console.log(omikronData);
const client = await MTPClient.create({
url: mtpUrl ?? "",
descriptor: "client",
@ -391,9 +398,7 @@ export function Provider(props: {
await client.auth();
const finalResponse = await authPayload;
if (disposed || clientRef.current !== client) {
return;
}
if (disposed || clientRef.current !== client) return;
setFreshContacts(finalResponse.data.contacts);
setFreshCommunities(finalResponse.data.communities ?? []);
@ -456,7 +461,7 @@ export function Provider(props: {
setIdentified(false);
setIdentifying(false);
};
}, [mtpUrl, props.blockConnection]);
}, [mtpUrl, props.blockConnection, load]);
// Async queue
const loadingDescription = useMemo(() => {