fix #35: pass correct value to TootActionGroup
All checks were successful
/ depoly (push) Successful in 1m19s

* add createDefaultTootEnv
This commit is contained in:
thislight 2024-12-26 22:06:15 +08:00
parent 6dd6065711
commit 5742932c86
No known key found for this signature in database
GPG key ID: FCFE5192241CCD4E
7 changed files with 179 additions and 235 deletions

View file

@ -7,7 +7,7 @@ import {
untrack,
useContext,
} from "solid-js";
import { Account } from "../accounts/stores";
import { Account, type RemoteServer } from "../accounts/stores";
import { createRestAPIClient, mastodon } from "masto";
import { useLocation } from "@solidjs/router";
import { useNavigator } from "~platform/StackedRouter";
@ -131,8 +131,8 @@ export function useSessionForAcctStr(acct: Accessor<string>) {
return (
authedSession ?? {
client: createUnauthorizedClient(inputSite),
account: { site: inputSite }, // TODO: we need some security checks here?
}
account: { site: inputSite } as RemoteServer, // TODO: we need some security checks here?
} as const
);
});
}