Dev/post refactor fixes (#927)

* Re-introduce outgoing message logging

Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com>

* Websocket dumping

* Sentry user count on API

* Generate session ID upon opening websocket, fix gateway dumps

* Async file io in src/gateway/events/Message.ts

Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com>

* Async file io in src/util/util/Config.ts

Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com>

* Make pre-commit hook executable

Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com>

* Fixed sync file io in src/util/util/Config.ts

Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com>

* Fixed missing await call in src/util/util/AutoUpdate.ts

Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com>

* Add comment to src/gateway/events/Connection.ts

Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com>

* Clean up gateway dumping code

Signed-off-by: TheArcaneBrony <myrainbowdash949@gmail.com>
Co-authored-by: Madeline <46743919+MaddyUnderStars@users.noreply.github.com>
This commit is contained in:
TheArcaneBrony
2023-01-12 13:46:36 +01:00
committed by GitHub
parent da9ce34933
commit 6122374e4d
9 changed files with 55 additions and 9 deletions
+3
View File
@@ -1,6 +1,7 @@
import { NextFunction, Request, Response } from "express";
import { HTTPError } from "lambert-server";
import { checkToken, Config, Rights } from "@fosscord/util";
import * as Sentry from "@sentry/node";
export const NO_AUTHORIZATION_ROUTES = [
// Authentication routes
@@ -63,6 +64,8 @@ export async function Authentication(
if (!req.headers.authorization)
return next(new HTTPError("Missing Authorization Header", 401));
Sentry.setUser({ id: req.user_id });
try {
const { jwtSecret } = Config.get().security;