summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/web/ClientServerService.ts
diff options
context:
space:
mode:
authortamaina <tamaina@hotmail.co.jp>2022-12-30 13:37:58 +0000
committertamaina <tamaina@hotmail.co.jp>2022-12-30 13:37:58 +0000
commit1a408db3b1abb1624448976e8340abccaa31a702 (patch)
treece7c53327ef648ec0e81fa61e467da0e12b81827 /packages/backend/src/server/web/ClientServerService.ts
parentimport sanitizeHtml from 'sanitize-html'; (diff)
downloadsharkey-1a408db3b1abb1624448976e8340abccaa31a702.tar.gz
sharkey-1a408db3b1abb1624448976e8340abccaa31a702.tar.bz2
sharkey-1a408db3b1abb1624448976e8340abccaa31a702.zip
fix: use || for emoji url fallback instead of ??
Diffstat (limited to 'packages/backend/src/server/web/ClientServerService.ts')
-rw-r--r--packages/backend/src/server/web/ClientServerService.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/backend/src/server/web/ClientServerService.ts b/packages/backend/src/server/web/ClientServerService.ts
index 83a30dbe0b..02b779d741 100644
--- a/packages/backend/src/server/web/ClientServerService.ts
+++ b/packages/backend/src/server/web/ClientServerService.ts
@@ -245,7 +245,8 @@ export class ClientServerService {
reply.header('Content-Security-Policy', 'default-src \'none\'; style-src \'unsafe-inline\'');
const url = new URL("/proxy/emoji.webp", this.config.url);
- url.searchParams.set('url', emoji.publicUrl ?? emoji.originalUrl); // ?? emoji.originalUrl してるのは後方互換性のため
+ // || emoji.originalUrl してるのは後方互換性のため(publicUrlはstringなので??はだめ)
+ url.searchParams.set('url', emoji.publicUrl || emoji.originalUrl);
url.searchParams.set('emoji', '1');
if ('static' in request.query) url.searchParams.set('static', '1');