11import { exportJwk , generateCryptoKeyPair , isActor } from "@fedify/fedify" ;
22import { Temporal } from "@js-temporal/polyfill" ;
33import { count , eq , sql } from "drizzle-orm" ;
4+ import { interval , jsonb , pgTable , timestamp , uuid } from "drizzle-orm/pg-core" ;
45import { Hono } from "hono" ;
56import { HTTPException } from "hono/http-exception" ;
67import { DashboardLayout } from "../components/DashboardLayout" ;
@@ -16,6 +17,7 @@ import { persistAccount } from "../federation/account";
1617import { isPost , persistPost } from "../federation/post" ;
1718import { loginRequired } from "../login" ;
1819import { accountOwners , accounts , instances , relays } from "../schema" ;
20+ import type { Uuid } from "../uuid" ;
1921
2022const data = new Hono ( ) ;
2123
@@ -410,6 +412,11 @@ data.post("/relay/:followRequestId/delete", async (c) => {
410412 throw new HTTPException ( 404 , { res : await c . notFound ( ) } ) ;
411413 }
412414
415+ // Delete all outgoing activities for this relay
416+ await tx
417+ . delete ( pgTable ( "fedify_message_v2" , { } ) )
418+ . where ( sql `"message"->>'inbox' = ${ relay . inboxUrl } ` ) ;
419+
413420 await fedCtx . sendActivity (
414421 { username : relay . relayClientActor . owner . handle } ,
415422 [
0 commit comments