summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/api/routes/users/@me/connections/#connection_name/#connection_id/index.ts5
-rw-r--r--src/util/schemas/ConnectionUpdateSchema.ts1
2 files changed, 5 insertions, 1 deletions
diff --git a/src/api/routes/users/@me/connections/#connection_name/#connection_id/index.ts b/src/api/routes/users/@me/connections/#connection_name/#connection_id/index.ts
index 6a8d31ca..afb0df06 100644
--- a/src/api/routes/users/@me/connections/#connection_name/#connection_id/index.ts
+++ b/src/api/routes/users/@me/connections/#connection_name/#connection_id/index.ts
@@ -4,7 +4,7 @@ import {
 	ConnectionUpdateSchema,
 	DiscordApiErrors,
 	emitEvent,
-} from "@spacevar/util";
+} from "@spacebar/util";
 import { Request, Response, Router } from "express";
 const router = Router();
 
@@ -44,6 +44,9 @@ router.patch(
 		if (typeof body.show_activity === "boolean")
 			//@ts-expect-error For some reason the client sends this as a boolean, even tho docs say its a number?
 			body.show_activity = body.show_activity ? 1 : 0;
+		if (typeof body.metadata_visibility === "boolean")
+			//@ts-expect-error For some reason the client sends this as a boolean, even tho docs say its a number?
+			body.metadata_visibility = body.metadata_visibility ? 1 : 0;
 
 		connection.assign(req.body);
 
diff --git a/src/util/schemas/ConnectionUpdateSchema.ts b/src/util/schemas/ConnectionUpdateSchema.ts
index eb6c0916..e1e6523a 100644
--- a/src/util/schemas/ConnectionUpdateSchema.ts
+++ b/src/util/schemas/ConnectionUpdateSchema.ts
@@ -1,4 +1,5 @@
 export interface ConnectionUpdateSchema {
 	visibility?: boolean;
 	show_activity?: boolean;
+	metadata_visibility?: boolean;
 }