diff options
Diffstat (limited to 'src/state/models/session.ts')
-rw-r--r-- | src/state/models/session.ts | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/state/models/session.ts b/src/state/models/session.ts deleted file mode 100644 index cc681ad34..000000000 --- a/src/state/models/session.ts +++ /dev/null @@ -1,43 +0,0 @@ -import {makeAutoObservable} from 'mobx' -import { - BskyAgent, - ComAtprotoServerDescribeServer as DescribeServer, -} from '@atproto/api' -import {RootStoreModel} from './root-store' - -export type ServiceDescription = DescribeServer.OutputSchema - -export class SessionModel { - data: any = {} - - constructor(public rootStore: RootStoreModel) { - makeAutoObservable(this, { - rootStore: false, - hasSession: false, - }) - } - - get currentSession(): any { - return undefined - } - - get hasSession() { - return false - } - - clear() {} - - /** - * Helper to fetch the accounts config settings from an account. - */ - async describeService(service: string): Promise<ServiceDescription> { - const agent = new BskyAgent({service}) - const res = await agent.com.atproto.server.describeServer({}) - return res.data - } - - /** - * Reloads the session from the server. Useful when account details change, like the handle. - */ - async reloadFromServer() {} -} |