diff --git a/api/src/routes/channels/#channel_id/messages/index.ts b/api/src/routes/channels/#channel_id/messages/index.ts index 1ae9d676..5fdab623 100644 --- a/api/src/routes/channels/#channel_id/messages/index.ts +++ b/api/src/routes/channels/#channel_id/messages/index.ts @@ -126,6 +126,13 @@ router.get("/", async (req: Request, res: Response) => { y.proxy_url = `${endpoint == null ? "" : endpoint}${new URL(uri).pathname}`; }); + //Some clients ( discord.js ) only check if a property exists within the response, + //which causes erorrs when, say, the `application` property is `null`. + for (var curr in x) { + if (x[curr] === null) + delete x[curr]; + } + return x; }) ); diff --git a/bundle/package-lock.json b/bundle/package-lock.json index 5e358801..20ffbad0 100644 Binary files a/bundle/package-lock.json and b/bundle/package-lock.json differ diff --git a/bundle/package.json b/bundle/package.json index 85ad68a7..8915665d 100644 --- a/bundle/package.json +++ b/bundle/package.json @@ -99,7 +99,7 @@ "picocolors": "^1.0.0", "proxy-agent": "^5.0.0", "reflect-metadata": "^0.1.13", - "sqlite3": "^5.0.2", + "sqlite3": "^4.2.0", "supertest": "^6.1.6", "tslib": "^2.3.1", "typeorm": "^0.2.37", diff --git a/util/package-lock.json b/util/package-lock.json index 386f95ec..9d20da93 100644 Binary files a/util/package-lock.json and b/util/package-lock.json differ