TootBottomSheet: use new cache semantic

This commit is contained in:
thislight 2024-12-26 20:09:03 +08:00
parent 5ab0d4d0a2
commit 6dd6065711
No known key found for this signature in database
GPG key ID: FCFE5192241CCD4E
4 changed files with 22 additions and 50 deletions

View file

@ -115,7 +115,7 @@ export function useDefaultSession() {
* - If the username is not present, any session on the site is returned; or,
* - If no available session available for the pattern, an unauthorised session is returned.
*
* In an unauthorised session, the `.account` is `undefined` and the `client` is an
* In an unauthorised session, the `.account` is {@link RemoteServer} and the `client` is an
* unauthorised client for the site. This client may not available for some operations.
*/
export function useSessionForAcctStr(acct: Accessor<string>) {
@ -131,7 +131,7 @@ export function useSessionForAcctStr(acct: Accessor<string>) {
return (
authedSession ?? {
client: createUnauthorizedClient(inputSite),
account: undefined,
account: { site: inputSite }, // TODO: we need some security checks here?
}
);
});