From d3e282abfbf73febfc2875f475f4d08fbba2c94a Mon Sep 17 00:00:00 2001 From: Nutomic Date: Tue, 19 Dec 2023 16:08:47 +0100 Subject: [PATCH] Move Lemmy federation context to join-lemmy.org (#285) * Move Lemmy federation context to join-lemmy.org Ref https://github.com/LemmyNet/lemmy/issues/4234 * add missing file --- src/assets/lemmy_federation_context.json | 25 ++++++++++++++++++++++++ src/server/index.tsx | 4 ++++ 2 files changed, 29 insertions(+) create mode 100644 src/assets/lemmy_federation_context.json diff --git a/src/assets/lemmy_federation_context.json b/src/assets/lemmy_federation_context.json new file mode 100644 index 0000000..d847b21 --- /dev/null +++ b/src/assets/lemmy_federation_context.json @@ -0,0 +1,25 @@ +[ + "https://www.w3.org/ns/activitystreams", + "https://w3id.org/security/v1", + { + "lemmy": "https://join-lemmy.org/ns#", + "litepub": "http://litepub.social/ns#", + "pt": "https://joinpeertube.org/ns#", + "sc": "http://schema.org/", + "ChatMessage": "litepub:ChatMessage", + "commentsEnabled": "pt:commentsEnabled", + "sensitive": "as:sensitive", + "matrixUserId": "lemmy:matrixUserId", + "postingRestrictedToMods": "lemmy:postingRestrictedToMods", + "removeData": "lemmy:removeData", + "stickied": "lemmy:stickied", + "moderators": { + "@type": "@id", + "@id": "lemmy:moderators" + }, + "expires": "as:endTime", + "distinguished": "lemmy:distinguished", + "language": "sc:inLanguage", + "identifier": "sc:identifier" + } +] diff --git a/src/server/index.tsx b/src/server/index.tsx index 98c1bc3..29ed305 100644 --- a/src/server/index.tsx +++ b/src/server/index.tsx @@ -17,6 +17,10 @@ server.use(express.urlencoded({ extended: false }) as RequestHandler); server.use("/static", express.static(path.resolve("./dist"))); server.use("/docs", express.static(path.resolve("./dist/assets/docs"))); server.use("/api", express.static(path.resolve("./dist/assets/api"))); +server.use( + "/context.json", + express.static(path.resolve("./dist/assets/lemmy_federation_context.json")), +); server.use("/feed.xml", express.static(path.resolve("./dist/feed.xml"))); function erudaInit(): string {