diff --git a/packages/backend/src/server/web/index.ts b/packages/backend/src/server/web/index.ts index f79eba64e6..78017f0af7 100644 --- a/packages/backend/src/server/web/index.ts +++ b/packages/backend/src/server/web/index.ts @@ -149,7 +149,7 @@ router.get<{ Params: { path: string } }>("/emoji/:path(.*)", async (ctx) => { return; } - let url = new URL(`${config.mediaProxy || config.url + "/proxy"}/emoji.webp`); + const url = new URL(`${config.mediaProxy || `${config.url}/proxy`}/emoji.webp`); // || emoji.originalUrl してるのは後方互換性のため url.searchParams.append("url", emoji.publicUrl || emoji.originalUrl); url.searchParams.append("emoji", "1"); @@ -370,9 +370,7 @@ const getFeed = async ( }; // As the /@user[.json|.rss|.atom]/sub endpoint is complicated, we will use a regex to switch between them. -const reUser = new RegExp( - "^/@(?[^/]+?)(?:.(?json|rss|atom)(?:\\?[^/]*)?)?(?:/(?[^/]+))?$", -); +const reUser = /^\/@(?[^\/]+?)(?:.(?json|rss|atom)(?:\?[^\/]*)?)?(?:\/(?[^\/]+))?$/; router.get(reUser, async (ctx, next) => { const groups = reUser.exec(ctx.originalUrl)?.groups; if (!groups) { diff --git a/packages/backend/src/server/web/manifest.ts b/packages/backend/src/server/web/manifest.ts index 19c3b27ad6..d3f4d349bf 100644 --- a/packages/backend/src/server/web/manifest.ts +++ b/packages/backend/src/server/web/manifest.ts @@ -5,7 +5,8 @@ import { config } from "@/config.js"; const manifest = { short_name: "Firefish", name: "Firefish", - description: "An open source, decentralized social media platform that's free forever!", + description: + "An open source, decentralized social media platform that's free forever!", start_url: "/", scope: "/", display: "standalone", @@ -17,34 +18,34 @@ const manifest = { src: "/static-assets/icons/192.png", sizes: "192x192", type: "image/png", - purpose: "any" + purpose: "any", }, { src: "/static-assets/icons/512.png", sizes: "512x512", type: "image/png", - purpose: "any" + purpose: "any", }, { src: "/static-assets/icons/maskable.png", sizes: "512x512", type: "image/png", - purpose: "maskable" + purpose: "maskable", }, { src: "/static-assets/icons/monochrome.png", sizes: "512x512", type: "image/png", - purpose: "monochrome" - } + purpose: "monochrome", + }, ], share_target: { action: "/share/", params: { title: "title", text: "text", - url: "url" - } + url: "url", + }, }, screenshots: [ { @@ -52,28 +53,28 @@ const manifest = { sizes: "1080x2340", type: "image/webp", platform: "narrow", - label: "Profile page" + label: "Profile page", }, { src: "/static-assets/screenshots/2.webp", sizes: "1080x2340", type: "image/webp", platform: "narrow", - label: "Posts" - } + label: "Posts", + }, ], shortcuts: [ { name: "Notifications", short_name: "Notifs", - url: "/my/notifications" + url: "/my/notifications", }, { name: "Chats", - url: "/my/messaging" - } + url: "/my/messaging", + }, ], - categories: ["social"] + categories: ["social"], }; export const manifestHandler = async (ctx: Koa.Context) => {