about summary refs log tree commit diff
path: root/src/state/session
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2025-01-23 22:33:28 +0000
committerGitHub <noreply@github.com>2025-01-23 22:33:28 +0000
commitf1d120d416bc262b5fd63e3407f9e0b09b13cd74 (patch)
tree5191aec11ef4367e7be299e3711cad2dcad29697 /src/state/session
parent084d11c63aebd0afc516931a11bddac9b24b3b18 (diff)
downloadvoidsky-f1d120d416bc262b5fd63e3407f9e0b09b13cd74.tar.zst
Takendown state + in-app takedown appeals (#7566)
* takendown screen

* add form, move button inline

* expect type error

* display error

* disable submit if too long

* move around all the ctas

* typos, rm layoutanimation, fix link

* use REASONAPPEAL
Diffstat (limited to 'src/state/session')
-rw-r--r--src/state/session/agent.ts7
-rw-r--r--src/state/session/index.tsx2
2 files changed, 7 insertions, 2 deletions
diff --git a/src/state/session/agent.ts b/src/state/session/agent.ts
index 84c816d44..ba0c14c1a 100644
--- a/src/state/session/agent.ts
+++ b/src/state/session/agent.ts
@@ -83,7 +83,12 @@ export async function createAgentAndLogin(
   ) => void,
 ) {
   const agent = new BskyAppAgent({service})
-  await agent.login({identifier, password, authFactorToken})
+  await agent.login({
+    identifier,
+    password,
+    authFactorToken,
+    allowTakendown: true,
+  })
 
   const account = agentToSessionAccountOrThrow(agent)
   const gates = tryFetchGates(account.did, 'prefer-fresh-gates')
diff --git a/src/state/session/index.tsx b/src/state/session/index.tsx
index 48b258863..03a8a936a 100644
--- a/src/state/session/index.tsx
+++ b/src/state/session/index.tsx
@@ -258,7 +258,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
     ],
   )
 
-  // @ts-ignore
+  // @ts-expect-error window type is not declared, debug only
   if (__DEV__ && isWeb) window.agent = state.currentAgentState.agent
 
   const agent = state.currentAgentState.agent as BskyAppAgent