diff --git a/api/well-known/webfinger/index.ts b/api/well-known/webfinger/index.ts index 8d3745b1..b549f833 100644 --- a/api/well-known/webfinger/index.ts +++ b/api/well-known/webfinger/index.ts @@ -2,6 +2,7 @@ import { apiRoute, applyConfig, idValidator, webfingerMention } from "@/api"; import { createRoute } from "@hono/zod-openapi"; import { getLogger } from "@logtape/logtape"; import type { ResponseError } from "@versia/federation"; +import { WebFinger } from "@versia/federation/schemas"; import { and, eq, isNull } from "drizzle-orm"; import { lookup } from "mime-types"; import { z } from "zod"; @@ -49,16 +50,7 @@ const route = createRoute({ description: "User information", content: { "application/json": { - schema: z.object({ - subject: z.string(), - links: z.array( - z.object({ - rel: z.string(), - type: z.string(), - href: z.string(), - }), - ), - }), + schema: WebFinger, }, }, }, diff --git a/bun.lockb b/bun.lockb index eda57002..264d5d63 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index eec1acca..1a683255 100644 --- a/package.json +++ b/package.json @@ -111,7 +111,7 @@ "@sentry/bun": "^8.30.0", "@tufjs/canonical-json": "^2.0.0", "@versia/client": "^0.1.0", - "@versia/federation": "^0.1.1-rc.0", + "@versia/federation": "^0.1.1-rc.4", "altcha-lib": "^1.1.0", "blurhash": "^2.0.5", "bullmq": "^5.13.0", @@ -152,5 +152,8 @@ "xss": "^1.0.15", "zod": "^3.23.8", "zod-validation-error": "^3.4.0" + }, + "patchedDependencies": { + "@versia/federation@0.1.1-rc.4": "patches/@versia%2Ffederation@0.1.1-rc.4.patch" } } diff --git a/patches/@versia%2Ffederation@0.1.1-rc.4.patch b/patches/@versia%2Ffederation@0.1.1-rc.4.patch new file mode 100644 index 00000000..6c99d8e8 --- /dev/null +++ b/patches/@versia%2Ffederation@0.1.1-rc.4.patch @@ -0,0 +1,42 @@ +diff --git a/dist/schemas.js b/dist/schemas.js +index 863bad7a46138cb41f5c946135c310029040079c..a0c671d98ce605e11729a58dfcfc256ce819b59f 100644 +--- a/dist/schemas.js ++++ b/dist/schemas.js +@@ -1,27 +1,4 @@ +-import { +- CollectionSchema, +- ContentFormatSchema, +- CustomEmojiExtensionSchema, +- DeleteSchema, +- DislikeSchema, +- EntitySchema, +- ExtensionPropertySchema, +- FollowAcceptSchema, +- FollowRejectSchema, +- FollowSchema, +- GroupSchema, +- InstanceMetadataSchema, +- LikeSchema, +- NoteSchema, +- ReactionSchema, +- ShareSchema, +- UnfollowSchema, +- UserSchema, +- VanityExtensionSchema, +- VoteSchema, +- WebFingerSchema +- } from "./chunk-xkj0ty3v.js"; +- export { ++export { + WebFingerSchema as WebFinger, + VanityExtensionSchema as VanityExtension, + UserSchema as User, +@@ -43,6 +20,6 @@ import { + CustomEmojiExtensionSchema as CustomEmojiExtension, + ContentFormatSchema as ContentFormat, + CollectionSchema as Collection +- }; ++} from "./chunk-xkj0ty3v.js"; + + //# debugId=E689838DDC6D7A1264756E2164756E21 +\ No newline at end of file