Skip to content

Commit ead5a47

Browse files
committed
fix: don't show relay account on oauth screen
1 parent 8585a94 commit ead5a47

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/oauth.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import { zValidator } from "@hono/zod-validator";
2-
import { eq } from "drizzle-orm";
2+
import { eq, not } from "drizzle-orm";
33
import { escape } from "es-toolkit";
44
import { type Context, Hono } from "hono";
55
import { cors } from "hono/cors";
66
import { z } from "zod";
77
import { Layout } from "./components/Layout";
88
import { db } from "./db";
9+
import { HOLLO_RELAY_ACTOR_ID } from "./entities/relay";
910
import { loginRequired } from "./login";
1011
import {
1112
createAccessToken,
@@ -20,6 +21,7 @@ import {
2021
type Application,
2122
type Scope,
2223
accessTokens,
24+
accountOwners as accountOwnersTable,
2325
applications,
2426
scopeEnum,
2527
} from "./schema";
@@ -55,6 +57,7 @@ app.get(
5557
return c.json({ error: "invalid_redirect_uri" }, 400);
5658
}
5759
const accountOwners = await db.query.accountOwners.findMany({
60+
where: not(eq(accountOwnersTable.id, HOLLO_RELAY_ACTOR_ID)),
5861
with: { account: true },
5962
});
6063
return c.html(

0 commit comments

Comments
 (0)