summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlTech98 <altech123159@gmail.com>2021-09-14 09:38:21 +0200
committerAlTech98 <altech123159@gmail.com>2021-09-14 09:38:21 +0200
commitc32bdf752676cdffaee99d3f47f29abb4f0514dc (patch)
tree27d45fb948518a0f53cf518e98dcf78ee3c44e1e
parentMerge pull request #358 from AlTech98/fix-356 (diff)
downloadserver-c32bdf752676cdffaee99d3f47f29abb4f0514dc.tar.xz
Fix invites creation
-rw-r--r--api/assets/schemas.json5
-rw-r--r--api/src/routes/channels/#channel_id/invites.ts2
2 files changed, 5 insertions, 2 deletions
diff --git a/api/assets/schemas.json b/api/assets/schemas.json
index 3f760c35..9c34f968 100644
--- a/api/assets/schemas.json
+++ b/api/assets/schemas.json
@@ -713,7 +713,10 @@
         "type": "object",
         "properties": {
             "target_user_id": {
-                "type": "string"
+                "type": [
+                    "null",
+                    "string"
+                ]
             },
             "target_type": {
                 "type": [
diff --git a/api/src/routes/channels/#channel_id/invites.ts b/api/src/routes/channels/#channel_id/invites.ts
index 2edb4fc2..71612e31 100644
--- a/api/src/routes/channels/#channel_id/invites.ts
+++ b/api/src/routes/channels/#channel_id/invites.ts
@@ -8,7 +8,7 @@ import { isTextChannel } from "./messages";
 const router: Router = Router();
 
 export interface InviteCreateSchema {
-	target_user_id?: string;
+	target_user_id?: string | null;
 	target_type?: string | null;
 	validate?: string | null; // ? what is this
 	max_age?: number;