Upgrade API, implement XRPC rework (#4857)

Co-authored-by: Matthieu Sieben <matthieu.sieben@gmail.com>
This commit is contained in:
Hailey 2024-08-12 14:00:15 -07:00 committed by GitHub
parent ae883e2df7
commit 7df2327424
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 543 additions and 360 deletions

View file

@ -37,14 +37,14 @@ export function usePreferencesQuery() {
refetchOnWindowFocus: true,
queryKey: preferencesQueryKey,
queryFn: async () => {
if (agent.session?.did === undefined) {
if (!agent.did) {
return DEFAULT_LOGGED_OUT_PREFERENCES
} else {
const res = await agent.getPreferences()
// save to local storage to ensure there are labels on initial requests
saveLabelers(
agent.session.did,
agent.did,
res.moderationPrefs.labelers.map(l => l.did),
)