summary refs log tree commit diff
path: root/api/src/routes/channels/#channel_id/messages/index.ts
diff options
context:
space:
mode:
authorSamuel <34555296+Flam3rboy@users.noreply.github.com>2021-10-18 11:02:08 +0200
committerGitHub <noreply@github.com>2021-10-18 11:02:08 +0200
commit046692b294c71d1e22702025e9fcc2b2303da1a7 (patch)
treea11fab1fcc682234aab0820d2c9c5fd6c128c63a /api/src/routes/channels/#channel_id/messages/index.ts
parentMerge pull request #477 from DiegoMagdaleno/master (diff)
downloadserver-046692b294c71d1e22702025e9fcc2b2303da1a7.tar.xz
fix default cdn endpoint for message attachments
Diffstat (limited to 'api/src/routes/channels/#channel_id/messages/index.ts')
-rw-r--r--api/src/routes/channels/#channel_id/messages/index.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/src/routes/channels/#channel_id/messages/index.ts b/api/src/routes/channels/#channel_id/messages/index.ts
index 296bec9a..a0834be0 100644
--- a/api/src/routes/channels/#channel_id/messages/index.ts
+++ b/api/src/routes/channels/#channel_id/messages/index.ts
@@ -119,7 +119,7 @@ router.get("/", async (req: Request, res: Response) => {
 			x.attachments?.forEach((x) => {
 				// dynamically set attachment proxy_url in case the endpoint changed
 				const uri = x.proxy_url.startsWith("http") ? x.proxy_url : `https://example.org${x.proxy_url}`;
-				x.proxy_url = `${endpoint == null ? "http://localhost:3003" : endpoint}${new URL(uri).pathname}`;
+				x.proxy_url = `${endpoint == null ? "" : endpoint}${new URL(uri).pathname}`;
 			});
 
 			return x;