summary refs log tree commit diff
path: root/src/api/routes/channels/#channel_id
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-04-01 19:04:22 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-04-01 19:04:22 +1100
commit13dedb6d251593054de6a64487f0b053060afd5c (patch)
treec829b67068133911cbecdab1057e0d8a0fea09f3 /src/api/routes/channels/#channel_id
parentgatewayresponse?? (diff)
parentRemove ALL fosscord mentions (diff)
downloadserver-13dedb6d251593054de6a64487f0b053060afd5c.tar.xz
Merge branch 'master' into feat/refactorIdentify
Diffstat (limited to 'src/api/routes/channels/#channel_id')
-rw-r--r--src/api/routes/channels/#channel_id/followers.ts4
-rw-r--r--src/api/routes/channels/#channel_id/index.ts8
-rw-r--r--src/api/routes/channels/#channel_id/invites.ts10
-rw-r--r--src/api/routes/channels/#channel_id/messages/#message_id/ack.ts8
-rw-r--r--src/api/routes/channels/#channel_id/messages/#message_id/crosspost.ts6
-rw-r--r--src/api/routes/channels/#channel_id/messages/#message_id/index.ts16
-rw-r--r--src/api/routes/channels/#channel_id/messages/#message_id/reactions.ts8
-rw-r--r--src/api/routes/channels/#channel_id/messages/bulk-delete.ts8
-rw-r--r--src/api/routes/channels/#channel_id/messages/index.ts10
-rw-r--r--src/api/routes/channels/#channel_id/permissions.ts8
-rw-r--r--src/api/routes/channels/#channel_id/pins.ts8
-rw-r--r--src/api/routes/channels/#channel_id/purge.ts8
-rw-r--r--src/api/routes/channels/#channel_id/recipients.ts8
-rw-r--r--src/api/routes/channels/#channel_id/typing.ts8
-rw-r--r--src/api/routes/channels/#channel_id/webhooks.ts12
15 files changed, 65 insertions, 65 deletions
diff --git a/src/api/routes/channels/#channel_id/followers.ts b/src/api/routes/channels/#channel_id/followers.ts
index a9d5d4ee..58906e73 100644
--- a/src/api/routes/channels/#channel_id/followers.ts
+++ b/src/api/routes/channels/#channel_id/followers.ts
@@ -1,6 +1,6 @@
 /*
-	Fosscord: A FOSS re-implementation and extension of the Discord.com backend.
-	Copyright (C) 2023 Fosscord and Fosscord Contributors
+	Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+	Copyright (C) 2023 Spacebar and Spacebar Contributors
 	
 	This program is free software: you can redistribute it and/or modify
 	it under the terms of the GNU Affero General Public License as published
diff --git a/src/api/routes/channels/#channel_id/index.ts b/src/api/routes/channels/#channel_id/index.ts
index 4a2023d2..db0d4242 100644
--- a/src/api/routes/channels/#channel_id/index.ts
+++ b/src/api/routes/channels/#channel_id/index.ts
@@ -1,6 +1,6 @@
 /*
-	Fosscord: A FOSS re-implementation and extension of the Discord.com backend.
-	Copyright (C) 2023 Fosscord and Fosscord Contributors
+	Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+	Copyright (C) 2023 Spacebar and Spacebar Contributors
 	
 	This program is free software: you can redistribute it and/or modify
 	it under the terms of the GNU Affero General Public License as published
@@ -25,9 +25,9 @@ import {
 	Recipient,
 	handleFile,
 	ChannelModifySchema,
-} from "@fosscord/util";
+} from "@spacebar/util";
 import { Request, Response, Router } from "express";
-import { route } from "@fosscord/api";
+import { route } from "@spacebar/api";
 
 const router: Router = Router();
 // TODO: delete channel
diff --git a/src/api/routes/channels/#channel_id/invites.ts b/src/api/routes/channels/#channel_id/invites.ts
index 49620aaf..9f247fe8 100644
--- a/src/api/routes/channels/#channel_id/invites.ts
+++ b/src/api/routes/channels/#channel_id/invites.ts
@@ -1,6 +1,6 @@
 /*
-	Fosscord: A FOSS re-implementation and extension of the Discord.com backend.
-	Copyright (C) 2023 Fosscord and Fosscord Contributors
+	Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+	Copyright (C) 2023 Spacebar and Spacebar Contributors
 	
 	This program is free software: you can redistribute it and/or modify
 	it under the terms of the GNU Affero General Public License as published
@@ -18,8 +18,8 @@
 
 import { Router, Request, Response } from "express";
 import { HTTPError } from "lambert-server";
-import { route } from "@fosscord/api";
-import { random } from "@fosscord/api";
+import { route } from "@spacebar/api";
+import { random } from "@spacebar/api";
 import {
 	Channel,
 	Invite,
@@ -28,7 +28,7 @@ import {
 	User,
 	Guild,
 	PublicInviteRelation,
-} from "@fosscord/util";
+} from "@spacebar/util";
 import { isTextChannel } from "./messages";
 
 const router: Router = Router();
diff --git a/src/api/routes/channels/#channel_id/messages/#message_id/ack.ts b/src/api/routes/channels/#channel_id/messages/#message_id/ack.ts
index 16c2de29..f098fa8e 100644
--- a/src/api/routes/channels/#channel_id/messages/#message_id/ack.ts
+++ b/src/api/routes/channels/#channel_id/messages/#message_id/ack.ts
@@ -1,6 +1,6 @@
 /*
-	Fosscord: A FOSS re-implementation and extension of the Discord.com backend.
-	Copyright (C) 2023 Fosscord and Fosscord Contributors
+	Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+	Copyright (C) 2023 Spacebar and Spacebar Contributors
 	
 	This program is free software: you can redistribute it and/or modify
 	it under the terms of the GNU Affero General Public License as published
@@ -21,9 +21,9 @@ import {
 	getPermission,
 	MessageAckEvent,
 	ReadState,
-} from "@fosscord/util";
+} from "@spacebar/util";
 import { Request, Response, Router } from "express";
-import { route } from "@fosscord/api";
+import { route } from "@spacebar/api";
 
 const router = Router();
 
diff --git a/src/api/routes/channels/#channel_id/messages/#message_id/crosspost.ts b/src/api/routes/channels/#channel_id/messages/#message_id/crosspost.ts
index bbbefad3..909a459e 100644
--- a/src/api/routes/channels/#channel_id/messages/#message_id/crosspost.ts
+++ b/src/api/routes/channels/#channel_id/messages/#message_id/crosspost.ts
@@ -1,6 +1,6 @@
 /*
-	Fosscord: A FOSS re-implementation and extension of the Discord.com backend.
-	Copyright (C) 2023 Fosscord and Fosscord Contributors
+	Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+	Copyright (C) 2023 Spacebar and Spacebar Contributors
 	
 	This program is free software: you can redistribute it and/or modify
 	it under the terms of the GNU Affero General Public License as published
@@ -17,7 +17,7 @@
 */
 
 import { Router, Response, Request } from "express";
-import { route } from "@fosscord/api";
+import { route } from "@spacebar/api";
 
 const router = Router();
 
diff --git a/src/api/routes/channels/#channel_id/messages/#message_id/index.ts b/src/api/routes/channels/#channel_id/messages/#message_id/index.ts
index 400b8f3a..cd4b243e 100644
--- a/src/api/routes/channels/#channel_id/messages/#message_id/index.ts
+++ b/src/api/routes/channels/#channel_id/messages/#message_id/index.ts
@@ -1,6 +1,6 @@
 /*
-	Fosscord: A FOSS re-implementation and extension of the Discord.com backend.
-	Copyright (C) 2023 Fosscord and Fosscord Contributors
+	Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+	Copyright (C) 2023 Spacebar and Spacebar Contributors
 	
 	This program is free software: you can redistribute it and/or modify
 	it under the terms of the GNU Affero General Public License as published
@@ -20,7 +20,7 @@ import {
 	Attachment,
 	Channel,
 	emitEvent,
-	FosscordApiErrors,
+	SpacebarApiErrors,
 	getPermission,
 	getRights,
 	Message,
@@ -31,11 +31,11 @@ import {
 	uploadFile,
 	MessageCreateSchema,
 	MessageEditSchema,
-} from "@fosscord/util";
+} from "@spacebar/util";
 import { Router, Response, Request } from "express";
 import multer from "multer";
-import { route } from "@fosscord/api";
-import { handleMessage, postHandleMessage } from "@fosscord/api";
+import { route } from "@spacebar/api";
+import { handleMessage, postHandleMessage } from "@spacebar/api";
 import { HTTPError } from "lambert-server";
 
 const router = Router();
@@ -163,14 +163,14 @@ router.put(
 		const snowflake = Snowflake.deconstruct(message_id);
 		if (Date.now() < snowflake.timestamp) {
 			// message is in the future
-			throw FosscordApiErrors.CANNOT_BACKFILL_TO_THE_FUTURE;
+			throw SpacebarApiErrors.CANNOT_BACKFILL_TO_THE_FUTURE;
 		}
 
 		const exists = await Message.findOne({
 			where: { id: message_id, channel_id: channel_id },
 		});
 		if (exists) {
-			throw FosscordApiErrors.CANNOT_REPLACE_BY_BACKFILL;
+			throw SpacebarApiErrors.CANNOT_REPLACE_BY_BACKFILL;
 		}
 
 		if (req.file) {
diff --git a/src/api/routes/channels/#channel_id/messages/#message_id/reactions.ts b/src/api/routes/channels/#channel_id/messages/#message_id/reactions.ts
index c3598b24..eafa70c8 100644
--- a/src/api/routes/channels/#channel_id/messages/#message_id/reactions.ts
+++ b/src/api/routes/channels/#channel_id/messages/#message_id/reactions.ts
@@ -1,6 +1,6 @@
 /*
-	Fosscord: A FOSS re-implementation and extension of the Discord.com backend.
-	Copyright (C) 2023 Fosscord and Fosscord Contributors
+	Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+	Copyright (C) 2023 Spacebar and Spacebar Contributors
 	
 	This program is free software: you can redistribute it and/or modify
 	it under the terms of the GNU Affero General Public License as published
@@ -30,8 +30,8 @@ import {
 	PartialEmoji,
 	PublicUserProjection,
 	User,
-} from "@fosscord/util";
-import { route } from "@fosscord/api";
+} from "@spacebar/util";
+import { route } from "@spacebar/api";
 import { Router, Response, Request } from "express";
 import { HTTPError } from "lambert-server";
 import { In } from "typeorm";
diff --git a/src/api/routes/channels/#channel_id/messages/bulk-delete.ts b/src/api/routes/channels/#channel_id/messages/bulk-delete.ts
index ee039d3e..18476d5c 100644
--- a/src/api/routes/channels/#channel_id/messages/bulk-delete.ts
+++ b/src/api/routes/channels/#channel_id/messages/bulk-delete.ts
@@ -1,6 +1,6 @@
 /*
-	Fosscord: A FOSS re-implementation and extension of the Discord.com backend.
-	Copyright (C) 2023 Fosscord and Fosscord Contributors
+	Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+	Copyright (C) 2023 Spacebar and Spacebar Contributors
 	
 	This program is free software: you can redistribute it and/or modify
 	it under the terms of the GNU Affero General Public License as published
@@ -25,9 +25,9 @@ import {
 	getRights,
 	MessageDeleteBulkEvent,
 	Message,
-} from "@fosscord/util";
+} from "@spacebar/util";
 import { HTTPError } from "lambert-server";
-import { route } from "@fosscord/api";
+import { route } from "@spacebar/api";
 
 const router: Router = Router();
 
diff --git a/src/api/routes/channels/#channel_id/messages/index.ts b/src/api/routes/channels/#channel_id/messages/index.ts
index 76f6a0dc..c871087a 100644
--- a/src/api/routes/channels/#channel_id/messages/index.ts
+++ b/src/api/routes/channels/#channel_id/messages/index.ts
@@ -1,6 +1,6 @@
 /*
-	Fosscord: A FOSS re-implementation and extension of the Discord.com backend.
-	Copyright (C) 2023 Fosscord and Fosscord Contributors
+	Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+	Copyright (C) 2023 Spacebar and Spacebar Contributors
 	
 	This program is free software: you can redistribute it and/or modify
 	it under the terms of the GNU Affero General Public License as published
@@ -36,9 +36,9 @@ import {
 	Rights,
 	Reaction,
 	User,
-} from "@fosscord/util";
+} from "@spacebar/util";
 import { HTTPError } from "lambert-server";
-import { handleMessage, postHandleMessage, route } from "@fosscord/api";
+import { handleMessage, postHandleMessage, route } from "@spacebar/api";
 import multer from "multer";
 import { FindManyOptions, FindOperator, LessThan, MoreThan } from "typeorm";
 import { URL } from "url";
@@ -146,7 +146,7 @@ router.get("/", async (req: Request, res: Response) => {
 				x.author = User.create({
 					id: "4",
 					discriminator: "0000",
-					username: "Fosscord Ghost",
+					username: "Spacebar Ghost",
 					public_flags: 0,
 				});
 			x.attachments?.forEach((y: Attachment) => {
diff --git a/src/api/routes/channels/#channel_id/permissions.ts b/src/api/routes/channels/#channel_id/permissions.ts
index da448678..68dbc2f2 100644
--- a/src/api/routes/channels/#channel_id/permissions.ts
+++ b/src/api/routes/channels/#channel_id/permissions.ts
@@ -1,6 +1,6 @@
 /*
-	Fosscord: A FOSS re-implementation and extension of the Discord.com backend.
-	Copyright (C) 2023 Fosscord and Fosscord Contributors
+	Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+	Copyright (C) 2023 Spacebar and Spacebar Contributors
 	
 	This program is free software: you can redistribute it and/or modify
 	it under the terms of the GNU Affero General Public License as published
@@ -24,11 +24,11 @@ import {
 	Member,
 	Role,
 	ChannelPermissionOverwriteSchema,
-} from "@fosscord/util";
+} from "@spacebar/util";
 import { Router, Response, Request } from "express";
 import { HTTPError } from "lambert-server";
 
-import { route } from "@fosscord/api";
+import { route } from "@spacebar/api";
 const router: Router = Router();
 
 // TODO: Only permissions your bot has in the guild or channel can be allowed/denied (unless your bot has a MANAGE_ROLES overwrite in the channel)
diff --git a/src/api/routes/channels/#channel_id/pins.ts b/src/api/routes/channels/#channel_id/pins.ts
index 28419383..32820916 100644
--- a/src/api/routes/channels/#channel_id/pins.ts
+++ b/src/api/routes/channels/#channel_id/pins.ts
@@ -1,6 +1,6 @@
 /*
-	Fosscord: A FOSS re-implementation and extension of the Discord.com backend.
-	Copyright (C) 2023 Fosscord and Fosscord Contributors
+	Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+	Copyright (C) 2023 Spacebar and Spacebar Contributors
 	
 	This program is free software: you can redistribute it and/or modify
 	it under the terms of the GNU Affero General Public License as published
@@ -24,9 +24,9 @@ import {
 	Message,
 	MessageUpdateEvent,
 	DiscordApiErrors,
-} from "@fosscord/util";
+} from "@spacebar/util";
 import { Router, Request, Response } from "express";
-import { route } from "@fosscord/api";
+import { route } from "@spacebar/api";
 
 const router: Router = Router();
 
diff --git a/src/api/routes/channels/#channel_id/purge.ts b/src/api/routes/channels/#channel_id/purge.ts
index 04d8cfa2..c8da6760 100644
--- a/src/api/routes/channels/#channel_id/purge.ts
+++ b/src/api/routes/channels/#channel_id/purge.ts
@@ -1,6 +1,6 @@
 /*
-	Fosscord: A FOSS re-implementation and extension of the Discord.com backend.
-	Copyright (C) 2023 Fosscord and Fosscord Contributors
+	Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+	Copyright (C) 2023 Spacebar and Spacebar Contributors
 	
 	This program is free software: you can redistribute it and/or modify
 	it under the terms of the GNU Affero General Public License as published
@@ -17,7 +17,7 @@
 */
 
 import { HTTPError } from "lambert-server";
-import { route } from "@fosscord/api";
+import { route } from "@spacebar/api";
 import { isTextChannel } from "./messages";
 import { FindManyOptions, Between, Not, FindOperator } from "typeorm";
 import {
@@ -28,7 +28,7 @@ import {
 	Message,
 	MessageDeleteBulkEvent,
 	PurgeSchema,
-} from "@fosscord/util";
+} from "@spacebar/util";
 import { Router, Response, Request } from "express";
 
 const router: Router = Router();
diff --git a/src/api/routes/channels/#channel_id/recipients.ts b/src/api/routes/channels/#channel_id/recipients.ts
index 252a8ef0..f1fb48af 100644
--- a/src/api/routes/channels/#channel_id/recipients.ts
+++ b/src/api/routes/channels/#channel_id/recipients.ts
@@ -1,6 +1,6 @@
 /*
-	Fosscord: A FOSS re-implementation and extension of the Discord.com backend.
-	Copyright (C) 2023 Fosscord and Fosscord Contributors
+	Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+	Copyright (C) 2023 Spacebar and Spacebar Contributors
 	
 	This program is free software: you can redistribute it and/or modify
 	it under the terms of the GNU Affero General Public License as published
@@ -27,8 +27,8 @@ import {
 	PublicUserProjection,
 	Recipient,
 	User,
-} from "@fosscord/util";
-import { route } from "@fosscord/api";
+} from "@spacebar/util";
+import { route } from "@spacebar/api";
 
 const router: Router = Router();
 
diff --git a/src/api/routes/channels/#channel_id/typing.ts b/src/api/routes/channels/#channel_id/typing.ts
index b50123c2..6a2fef39 100644
--- a/src/api/routes/channels/#channel_id/typing.ts
+++ b/src/api/routes/channels/#channel_id/typing.ts
@@ -1,6 +1,6 @@
 /*
-	Fosscord: A FOSS re-implementation and extension of the Discord.com backend.
-	Copyright (C) 2023 Fosscord and Fosscord Contributors
+	Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+	Copyright (C) 2023 Spacebar and Spacebar Contributors
 	
 	This program is free software: you can redistribute it and/or modify
 	it under the terms of the GNU Affero General Public License as published
@@ -16,8 +16,8 @@
 	along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */
 
-import { Channel, emitEvent, Member, TypingStartEvent } from "@fosscord/util";
-import { route } from "@fosscord/api";
+import { Channel, emitEvent, Member, TypingStartEvent } from "@spacebar/util";
+import { route } from "@spacebar/api";
 import { Router, Request, Response } from "express";
 
 const router: Router = Router();
diff --git a/src/api/routes/channels/#channel_id/webhooks.ts b/src/api/routes/channels/#channel_id/webhooks.ts
index 31cae747..14791a1c 100644
--- a/src/api/routes/channels/#channel_id/webhooks.ts
+++ b/src/api/routes/channels/#channel_id/webhooks.ts
@@ -1,6 +1,6 @@
 /*
-	Fosscord: A FOSS re-implementation and extension of the Discord.com backend.
-	Copyright (C) 2023 Fosscord and Fosscord Contributors
+	Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
+	Copyright (C) 2023 Spacebar and Spacebar Contributors
 	
 	This program is free software: you can redistribute it and/or modify
 	it under the terms of the GNU Affero General Public License as published
@@ -17,7 +17,7 @@
 */
 
 import { Router, Response, Request } from "express";
-import { route } from "@fosscord/api";
+import { route } from "@spacebar/api";
 import {
 	Channel,
 	Config,
@@ -27,10 +27,10 @@ import {
 	Webhook,
 	WebhookCreateSchema,
 	WebhookType,
-} from "@fosscord/util";
+} from "@spacebar/util";
 import { HTTPError } from "lambert-server";
 import { isTextChannel } from "./messages/index";
-import { DiscordApiErrors } from "@fosscord/util";
+import { DiscordApiErrors } from "@spacebar/util";
 import crypto from "crypto";
 
 const router: Router = Router();
@@ -63,7 +63,7 @@ router.post(
 
 		// TODO: move this
 		if (name === "clyde") throw new HTTPError("Invalid name", 400);
-		if (name === "Fosscord Ghost") throw new HTTPError("Invalid name", 400);
+		if (name === "Spacebar Ghost") throw new HTTPError("Invalid name", 400);
 
 		if (avatar) avatar = await handleFile(`/avatars/${channel_id}`, avatar);