From e31d8e85a62114e275cb495d0378109542824033 Mon Sep 17 00:00:00 2001 From: Daniel Huber <30466471+daniel0611@users.noreply.github.com> Date: Mon, 3 Jan 2022 11:02:42 +0100 Subject: [PATCH 01/31] Incrementing user discriminators Closes #328 --- util/src/entities/Config.ts | 2 ++ util/src/entities/User.ts | 49 +++++++++++++++++++++++++------------ 2 files changed, 35 insertions(+), 16 deletions(-) diff --git a/util/src/entities/Config.ts b/util/src/entities/Config.ts index 9e25c7379..6993cc095 100644 --- a/util/src/entities/Config.ts +++ b/util/src/entities/Config.ts @@ -149,6 +149,7 @@ export interface ConfigValue { minUpperCase: number; minSymbols: number; }; + incrementingDiscriminators: boolean; // random otherwise }; regions: { default: string; @@ -335,6 +336,7 @@ export const DefaultConfigOptions: ConfigValue = { minUpperCase: 2, minSymbols: 0, }, + incrementingDiscriminators: false, }, regions: { default: "fosscord", diff --git a/util/src/entities/User.ts b/util/src/entities/User.ts index bc852616d..5f2618e0e 100644 --- a/util/src/entities/User.ts +++ b/util/src/entities/User.ts @@ -64,7 +64,7 @@ export class User extends BaseClass { setDiscriminator(val: string) { const number = Number(val); if (isNaN(number)) throw new Error("invalid discriminator"); - if (number <= 0 || number > 10000) throw new Error("discriminator must be between 1 and 9999"); + if (number <= 0 || number >= 10000) throw new Error("discriminator must be between 1 and 9999"); this.discriminator = val.toString().padStart(4, "0"); } @@ -178,6 +178,35 @@ export class User extends BaseClass { ); } + private static async generateDiscriminator(username: string): Promise { + if (Config.get().register.incrementingDiscriminators) { + // discriminator will be incrementally generated + + // First we need to figure out the currently highest discrimnator for the given username and then increment it + const users = await User.find({ where: { username }, select: ["discriminator"] }); + const highestDiscriminator = Math.max(0, ...users.map((u) => Number(u.discriminator))); + + const discriminator = highestDiscriminator + 1; + if (discriminator >= 10000) { + return undefined; + } + + return discriminator.toString().padStart(4, "0"); + } else { + // discriminator will be randomly generated + + // randomly generates a discriminator between 1 and 9999 and checks max five times if it already exists + // TODO: is there any better way to generate a random discriminator only once, without checking if it already exists in the database? + for (let tries = 0; tries < 5; tries++) { + const discriminator = Math.randomIntBetween(1, 9999).toString().padStart(4, "0"); + const exists = await User.findOne({ where: { discriminator, username: username }, select: ["id"] }); + if (!exists) return discriminator; + } + + return undefined; + } + } + static async register({ email, username, @@ -194,21 +223,9 @@ export class User extends BaseClass { // trim special uf8 control characters -> Backspace, Newline, ... username = trimSpecial(username); - // discriminator will be randomly generated - let discriminator = ""; - - let exists; - // randomly generates a discriminator between 1 and 9999 and checks max five times if it already exists - // if it all five times already exists, abort with USERNAME_TOO_MANY_USERS error - // else just continue - // TODO: is there any better way to generate a random discriminator only once, without checking if it already exists in the database? - for (let tries = 0; tries < 5; tries++) { - discriminator = Math.randomIntBetween(1, 9999).toString().padStart(4, "0"); - exists = await User.findOne({ where: { discriminator, username: username }, select: ["id"] }); - if (!exists) break; - } - - if (exists) { + const discriminator = await User.generateDiscriminator(username); + if (!discriminator) { + // We've failed to generate a valid and unused discriminator throw FieldErrors({ username: { code: "USERNAME_TOO_MANY_USERS", From 029263372152accba11cb2a95b6340753de5b5c5 Mon Sep 17 00:00:00 2001 From: Thesourtimes Date: Tue, 4 Jan 2022 20:51:04 +0300 Subject: [PATCH 02/31] Update documents --- .github/relase_body_template.md | 3 ++- api/package.json | 2 +- cdn/package.json | 2 +- dashboard/LICENSE | 14 ++++++++++++++ dashboard/package.json | 24 +++++++++++++++++++++++- dashboard/src/index.ts | 0 gateway/package.json | 2 +- rtc/LICENSE | 14 ++++++++++++++ webrtc/LICENSE | 29 +++++++++++------------------ 9 files changed, 67 insertions(+), 23 deletions(-) create mode 100644 dashboard/LICENSE create mode 100644 dashboard/src/index.ts create mode 100644 rtc/LICENSE diff --git a/.github/relase_body_template.md b/.github/relase_body_template.md index 34b468804..994e83d35 100644 --- a/.github/relase_body_template.md +++ b/.github/relase_body_template.md @@ -1,9 +1,10 @@ ## Notes ## Additions +- ## Fixes - +- ## Download - [Windows]() - [MacOS]() diff --git a/api/package.json b/api/package.json index 303d58716..182e53de2 100644 --- a/api/package.json +++ b/api/package.json @@ -30,7 +30,7 @@ "discord-open-source" ], "author": "Fosscord", - "license": "ISC", + "license": "GPLV3", "bugs": { "url": "https://github.com/fosscord/fosscord-server/issues" }, diff --git a/cdn/package.json b/cdn/package.json index fec43785c..d626e2f45 100644 --- a/cdn/package.json +++ b/cdn/package.json @@ -15,7 +15,7 @@ }, "keywords": [], "author": "", - "license": "ISC", + "license": "GPLV3", "bugs": { "url": "https://github.com/fosscord/fosscord-server/issues" }, diff --git a/dashboard/LICENSE b/dashboard/LICENSE new file mode 100644 index 000000000..f19bf5202 --- /dev/null +++ b/dashboard/LICENSE @@ -0,0 +1,14 @@ +Copyright (C) 2021 Fosscord and 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 by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . \ No newline at end of file diff --git a/dashboard/package.json b/dashboard/package.json index 0967ef424..1009d658e 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -1 +1,23 @@ -{} +{ + "name": "@fosscord/dashboard", + "version": "1.0.0", + "description": "Dashboard for Fosscord", + "main": "dist/index.js", + "types": "src/index.ts", + "scripts": { + "test": "npm run build && jest --coverage ./tests", + "build": "npx tsc -p .", + "start": "node dist/start.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/fosscord/fosscord-server.git" + }, + "keywords": [], + "author": "", + "license": "GPLV3", + "bugs": { + "url": "https://github.com/fosscord/fosscord-server/issues" + }, + "homepage": "https://github.com/fosscord/fosscord-server#readme" +} diff --git a/dashboard/src/index.ts b/dashboard/src/index.ts new file mode 100644 index 000000000..e69de29bb diff --git a/gateway/package.json b/gateway/package.json index e02a0000f..f976b3e7a 100644 --- a/gateway/package.json +++ b/gateway/package.json @@ -13,7 +13,7 @@ }, "keywords": [], "author": "Fosscord", - "license": "ISC", + "license": "GPLV3", "devDependencies": { "@types/amqplib": "^0.8.1", "@types/jsonwebtoken": "^8.5.0", diff --git a/rtc/LICENSE b/rtc/LICENSE new file mode 100644 index 000000000..f19bf5202 --- /dev/null +++ b/rtc/LICENSE @@ -0,0 +1,14 @@ +Copyright (C) 2021 Fosscord and 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 by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . \ No newline at end of file diff --git a/webrtc/LICENSE b/webrtc/LICENSE index e8ea215a4..f19bf5202 100644 --- a/webrtc/LICENSE +++ b/webrtc/LICENSE @@ -1,21 +1,14 @@ -MIT License +Copyright (C) 2021 Fosscord and contributors -Copyright (c) 2021 Fosscord (former Discord Open Source) +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 by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . \ No newline at end of file From aaf5df14e1523ef70fcb9aa5ff9fc0b73ff42fee Mon Sep 17 00:00:00 2001 From: Chris Chrome Date: Wed, 5 Jan 2022 05:44:14 -0500 Subject: [PATCH 03/31] Add Role Icons (#574) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Role Icons Co-authored-by: Erkin Alp Güney * Cache coherency rules Co-authored-by: MANIKILLER Co-authored-by: ImAaronFR <96433859+ImAaronFR@users.noreply.github.com> --- api/src/routes/guilds/#guild_id/roles.ts | 11 ++- bundle/package.json | 2 +- cdn/src/Server.ts | 4 + cdn/src/routes/role-icons.ts | 102 +++++++++++++++++++++++ util/src/entities/Guild.ts | 2 + util/src/entities/Role.ts | 6 ++ 6 files changed, 124 insertions(+), 3 deletions(-) create mode 100644 cdn/src/routes/role-icons.ts diff --git a/api/src/routes/guilds/#guild_id/roles.ts b/api/src/routes/guilds/#guild_id/roles.ts index b1875598b..b6894e3f2 100644 --- a/api/src/routes/guilds/#guild_id/roles.ts +++ b/api/src/routes/guilds/#guild_id/roles.ts @@ -8,7 +8,8 @@ import { GuildRoleDeleteEvent, emitEvent, Config, - DiscordApiErrors + DiscordApiErrors, + handleFile } from "@fosscord/util"; import { HTTPError } from "lambert-server"; import { route } from "@fosscord/api"; @@ -22,6 +23,8 @@ export interface RoleModifySchema { hoist?: boolean; // whether the role should be displayed separately in the sidebar mentionable?: boolean; // whether the role should be mentionable position?: number; + icon?: string; + unicode_emoji?: string; } export type RolePositionUpdateSchema = { @@ -58,7 +61,9 @@ router.post("/", route({ body: "RoleModifySchema", permission: "MANAGE_ROLES" }) guild_id: guild_id, managed: false, permissions: String(req.permission!.bitfield & BigInt(body.permissions || "0")), - tags: undefined + tags: undefined, + icon: null, + unicode_emoji: null }); await Promise.all([ @@ -105,6 +110,8 @@ router.patch("/:role_id", route({ body: "RoleModifySchema", permission: "MANAGE_ const { role_id, guild_id } = req.params; const body = req.body as RoleModifySchema; + if (body.icon) body.icon = await handleFile(`/role-icons/${role_id}`, body.icon as string); + const role = new Role({ ...body, id: role_id, diff --git a/bundle/package.json b/bundle/package.json index e0ae6156f..456c89d7b 100644 --- a/bundle/package.json +++ b/bundle/package.json @@ -107,4 +107,4 @@ "ws": "^7.4.2", "nanocolors": "^0.2.12" } -} \ No newline at end of file +} diff --git a/cdn/src/Server.ts b/cdn/src/Server.ts index cac34a80d..b8d71fa95 100644 --- a/cdn/src/Server.ts +++ b/cdn/src/Server.ts @@ -2,6 +2,7 @@ import { Server, ServerOptions } from "lambert-server"; import { Config, initDatabase, registerRoutes } from "@fosscord/util"; import path from "path"; import avatarsRoute from "./routes/avatars"; +import iconsRoute from "./routes/role-icons"; import bodyParser from "body-parser"; export interface CDNServerOptions extends ServerOptions {} @@ -40,6 +41,9 @@ export class CDNServer extends Server { this.app.use("/icons/", avatarsRoute); this.log("verbose", "[Server] Route /icons registered"); + this.app.use("/role-icons/", iconsRoute); + this.log("verbose", "[Server] Route /role-icons registered"); + this.app.use("/emojis/", avatarsRoute); this.log("verbose", "[Server] Route /emojis registered"); diff --git a/cdn/src/routes/role-icons.ts b/cdn/src/routes/role-icons.ts new file mode 100644 index 000000000..1ad1637d2 --- /dev/null +++ b/cdn/src/routes/role-icons.ts @@ -0,0 +1,102 @@ +import { Router, Response, Request } from "express"; +import { Config, Snowflake } from "@fosscord/util"; +import { storage } from "../util/Storage"; +import FileType from "file-type"; +import { HTTPError } from "lambert-server"; +import crypto from "crypto"; +import { multer } from "../util/multer"; + +//Role icons ---> avatars.ts modified + +// TODO: check premium and animated pfp are allowed in the config +// TODO: generate different sizes of icon +// TODO: generate different image types of icon +// TODO: delete old icons + +const STATIC_MIME_TYPES = [ + "image/png", + "image/jpeg", + "image/webp", + "image/svg+xml", + "image/svg", +]; +const ALLOWED_MIME_TYPES = [...STATIC_MIME_TYPES]; + +const router = Router(); + +router.post( + "/:role_id", + multer.single("file"), + async (req: Request, res: Response) => { + if (req.headers.signature !== Config.get().security.requestSignature) + throw new HTTPError("Invalid request signature"); + if (!req.file) throw new HTTPError("Missing file"); + const { buffer, mimetype, size, originalname, fieldname } = req.file; + const { role_id } = req.params; + + var hash = crypto + .createHash("md5") + .update(Snowflake.generate()) + .digest("hex"); + + const type = await FileType.fromBuffer(buffer); + if (!type || !ALLOWED_MIME_TYPES.includes(type.mime)) + throw new HTTPError("Invalid file type"); + + const path = `role-icons/${role_id}/${hash}.png`; + const endpoint = + Config.get().cdn.endpointPublic || "http://localhost:3003"; + + await storage.set(path, buffer); + + return res.json({ + id: hash, + content_type: type.mime, + size, + url: `${endpoint}${req.baseUrl}/${role_id}/${hash}`, + }); + } +); + +router.get("/:role_id", async (req: Request, res: Response) => { + var { role_id } = req.params; + //role_id = role_id.split(".")[0]; // remove .file extension + const path = `role-icons/${role_id}`; + + const file = await storage.get(path); + if (!file) throw new HTTPError("not found", 404); + const type = await FileType.fromBuffer(file); + + res.set("Content-Type", type?.mime); + res.set("Cache-Control", "public, max-age=31536000, must-revalidate"); + + return res.send(file); +}); + +router.get("/:role_id/:hash", async (req: Request, res: Response) => { + var { role_id, hash } = req.params; + //hash = hash.split(".")[0]; // remove .file extension + const path = `role-icons/${role_id}/${hash}`; + + const file = await storage.get(path); + if (!file) throw new HTTPError("not found", 404); + const type = await FileType.fromBuffer(file); + + res.set("Content-Type", type?.mime); + res.set("Cache-Control", "public, max-age=31536000, must-revalidate"); + + return res.send(file); +}); + +router.delete("/:role_id/:id", async (req: Request, res: Response) => { + if (req.headers.signature !== Config.get().security.requestSignature) + throw new HTTPError("Invalid request signature"); + const { role_id, id } = req.params; + const path = `role-icons/${role_id}/${id}`; + + await storage.delete(path); + + return res.send({ success: true }); +}); + +export default router; diff --git a/util/src/entities/Guild.ts b/util/src/entities/Guild.ts index 157f0921b..f4c94a642 100644 --- a/util/src/entities/Guild.ts +++ b/util/src/entities/Guild.ts @@ -340,6 +340,8 @@ export class Guild extends BaseClass { name: "@everyone", permissions: String("2251804225"), position: 0, + icon: null, + unicode_emoji: null }).save(); if (!body.channels || !body.channels.length) body.channels = [{ id: "01", type: 0, name: "general" }]; diff --git a/util/src/entities/Role.ts b/util/src/entities/Role.ts index 9fca99a5b..4b721b5bb 100644 --- a/util/src/entities/Role.ts +++ b/util/src/entities/Role.ts @@ -36,6 +36,12 @@ export class Role extends BaseClass { @Column() position: number; + @Column({ nullable: true }) + icon: string; + + @Column({ nullable: true }) + unicode_emoji: string; + @Column({ type: "simple-json", nullable: true }) tags?: { bot_id?: string; From a8bd9cc7954c9411df85277a8ff7ff44d2a041d0 Mon Sep 17 00:00:00 2001 From: Thesourtimes Date: Thu, 6 Jan 2022 22:14:00 +0300 Subject: [PATCH 04/31] Correct the invite response --- api/src/routes/invites/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/routes/invites/index.ts b/api/src/routes/invites/index.ts index a2cf4cb5e..ac8131269 100644 --- a/api/src/routes/invites/index.ts +++ b/api/src/routes/invites/index.ts @@ -19,7 +19,7 @@ router.post("/:code", route({}), async (req: Request, res: Response) => { const { features } = await Guild.findOneOrFail({ id: guild_id}); const { public_flags } = await User.findOneOrFail({ id: req.user_id }); - if(features.includes("INTERNAL_EMPLOYEE_ONLY") && (public_flags & 1) !== 1) throw new HTTPError("You are not allowed to join this guild.", 401) + if(features.includes("INTERNAL_EMPLOYEE_ONLY") && (public_flags & 1) !== 1) throw new HTTPError("The Maze isn't meant for you.", 401) const invite = await Invite.joinGuild(req.user_id, code); From 1b42df8a32fc333ded943557dce0b0835fb11480 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erkin=20Alp=20G=C3=BCney?= Date: Sun, 9 Jan 2022 23:28:26 +0300 Subject: [PATCH 05/31] Update role-icons.ts --- cdn/src/routes/role-icons.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cdn/src/routes/role-icons.ts b/cdn/src/routes/role-icons.ts index 1ad1637d2..12aae8a4e 100644 --- a/cdn/src/routes/role-icons.ts +++ b/cdn/src/routes/role-icons.ts @@ -8,10 +8,9 @@ import { multer } from "../util/multer"; //Role icons ---> avatars.ts modified -// TODO: check premium and animated pfp are allowed in the config +// TODO: check user rights and perks and animated pfp are allowed in the policies // TODO: generate different sizes of icon // TODO: generate different image types of icon -// TODO: delete old icons const STATIC_MIME_TYPES = [ "image/png", From e275d2c77d7798f3dc3043f2afeaa3f9b07183c0 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Wed, 12 Jan 2022 01:27:55 +1100 Subject: [PATCH 06/31] Message fixes | Character limits and embed fixes (#581) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Adds message character limits (#503) * Fixed message `embeds` being ignored for `embed` * Update Message.ts Co-authored-by: Erkin Alp Güney --- .../channels/#channel_id/messages/index.ts | 2 +- api/src/util/handlers/Message.ts | 20 ++++++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/api/src/routes/channels/#channel_id/messages/index.ts b/api/src/routes/channels/#channel_id/messages/index.ts index b2fb615c3..c3d3d408e 100644 --- a/api/src/routes/channels/#channel_id/messages/index.ts +++ b/api/src/routes/channels/#channel_id/messages/index.ts @@ -172,7 +172,7 @@ router.post( } const channel = await Channel.findOneOrFail({ where: { id: channel_id }, relations: ["recipients", "recipients.user"] }); - const embeds = []; + const embeds = body.embeds || []; if (body.embed) embeds.push(body.embed); let message = await handleMessage({ ...body, diff --git a/api/src/util/handlers/Message.ts b/api/src/util/handlers/Message.ts index ba6763948..294141774 100644 --- a/api/src/util/handlers/Message.ts +++ b/api/src/util/handlers/Message.ts @@ -17,13 +17,14 @@ import { User, Application, Webhook, - Attachment + Attachment, + Config, } from "@fosscord/util"; import { HTTPError } from "lambert-server"; import fetch from "node-fetch"; import cheerio from "cheerio"; import { MessageCreateSchema } from "../../routes/channels/#channel_id/messages"; - +const allow_empty = false; // TODO: check webhook, application, system author, stickers // TODO: embed gifs/videos/images @@ -55,6 +56,10 @@ export async function handleMessage(opts: MessageOptions): Promise { type: opts.type ?? 0 }); + if (message.content && message.content.length > Config.get().limits.message.maxCharacters) { + throw new HTTPError("Content length over max character limit") + } + // TODO: are tts messages allowed in dm channels? should permission be checked? if (opts.author_id) { message.author = await User.getPublicUser(opts.author_id); @@ -67,7 +72,7 @@ export async function handleMessage(opts: MessageOptions): Promise { } const permission = await getPermission(opts.author_id, channel.guild_id, opts.channel_id); - permission.hasThrow("SEND_MESSAGES"); + permission.hasThrow("SEND_MESSAGES"); // TODO: add the rights check if (permission.cache.member) { message.member = permission.cache.member; } @@ -75,6 +80,7 @@ export async function handleMessage(opts: MessageOptions): Promise { if (opts.tts) permission.hasThrow("SEND_TTS_MESSAGES"); if (opts.message_reference) { permission.hasThrow("READ_MESSAGE_HISTORY"); + // code below has to be redone when we add custom message routing and cross-channel replies if (opts.message_reference.guild_id !== channel.guild_id) throw new HTTPError("You can only reference messages from this guild"); if (opts.message_reference.channel_id !== opts.channel_id) throw new HTTPError("You can only reference messages from this channel"); // TODO: should be checked if the referenced message exists? @@ -83,7 +89,7 @@ export async function handleMessage(opts: MessageOptions): Promise { } // TODO: stickers/activity - if (!opts.content && !opts.embeds?.length && !opts.attachments?.length && !opts.sticker_ids?.length) { + if (!allow_empty || (!opts.content && !opts.embeds?.length && !opts.attachments?.length && !opts.sticker_ids?.length)) { throw new HTTPError("Empty messages are not allowed", 50006); } @@ -93,7 +99,7 @@ export async function handleMessage(opts: MessageOptions): Promise { var mention_user_ids = [] as string[]; var mention_everyone = false; - if (content) { + if (content) { // TODO: explicit-only mentions message.content = content.trim(); for (const [_, mention] of content.matchAll(CHANNEL_MENTION)) { if (!mention_channel_ids.includes(mention)) mention_channel_ids.push(mention); @@ -135,7 +141,7 @@ export async function postHandleMessage(message: Message) { const data = { ...message }; data.embeds = data.embeds.filter((x) => x.type !== "link"); - links = links.slice(0, 5); // embed max 5 links + links = links.slice(0, 20); // embed max 20 links — TODO: make this configurable with instance policies for (const link of links) { try { @@ -188,7 +194,7 @@ export async function sendMessage(opts: MessageOptions) { emitEvent({ event: "MESSAGE_CREATE", channel_id: opts.channel_id, data: message.toJSON() } as MessageCreateEvent) ]); - postHandleMessage(message).catch((e) => {}); // no await as it shouldnt block the message send function and silently catch error + postHandleMessage(message).catch((e) => {}); // no await as it should catch error non-blockingly return message; } From 1887703c56b56ec7d9f2c66f5b740cb30db08122 Mon Sep 17 00:00:00 2001 From: ced777ric Date: Tue, 11 Jan 2022 18:38:10 +0100 Subject: [PATCH 07/31] fix the message endpoint always returning Empty message error (cherry picked from commit 8b8344e860920f3c3b911dfde1a7a078fef43c9b) --- api/src/util/handlers/Message.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/util/handlers/Message.ts b/api/src/util/handlers/Message.ts index 294141774..a3055aed7 100644 --- a/api/src/util/handlers/Message.ts +++ b/api/src/util/handlers/Message.ts @@ -89,7 +89,7 @@ export async function handleMessage(opts: MessageOptions): Promise { } // TODO: stickers/activity - if (!allow_empty || (!opts.content && !opts.embeds?.length && !opts.attachments?.length && !opts.sticker_ids?.length)) { + if (!allow_empty && (!opts.content && !opts.embeds?.length && !opts.attachments?.length && !opts.sticker_ids?.length)) { throw new HTTPError("Empty messages are not allowed", 50006); } From d10c53fffe3a31ee10001c86ca4cea479146c5a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erkin=20Alp=20G=C3=BCney?= Date: Tue, 11 Jan 2022 21:58:51 +0300 Subject: [PATCH 08/31] Use the boomerang logo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cc831e627..1bcea1e32 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- +

Fosscord Server

From 90ba897ca4283d549208df1efa56795f1d133843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erkin=20Alp=20G=C3=BCney?= Date: Wed, 12 Jan 2022 09:55:14 +0300 Subject: [PATCH 09/31] Schema change for group specific emojis --- util/src/entities/Emoji.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util/src/entities/Emoji.ts b/util/src/entities/Emoji.ts index 03218375b..32d39234f 100644 --- a/util/src/entities/Emoji.ts +++ b/util/src/entities/Emoji.ts @@ -10,7 +10,7 @@ export class Emoji extends BaseClass { animated: boolean; @Column() - available: boolean; // whether this emoji can be used, may be false due to loss of Server Boosts + available: boolean; // whether this emoji can be used, may be false due to various reasons @Column() guild_id: string; @@ -40,4 +40,7 @@ export class Emoji extends BaseClass { @Column({ type: "simple-array" }) roles: string[]; // roles this emoji is whitelisted to (new discord feature?) + + @Column({ type: "simple-array" }) + groups: string[]; // user groups this emoji is whitelisted to (Fosscord extension) } From 4baa6e0620760b93e68e780b8746cf2a257800df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erkin=20Alp=20G=C3=BCney?= Date: Wed, 12 Jan 2022 09:58:22 +0300 Subject: [PATCH 10/31] Add cross channel replies Resolves #533 --- api/src/util/handlers/Message.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/src/util/handlers/Message.ts b/api/src/util/handlers/Message.ts index a3055aed7..dae6f7e8c 100644 --- a/api/src/util/handlers/Message.ts +++ b/api/src/util/handlers/Message.ts @@ -81,8 +81,10 @@ export async function handleMessage(opts: MessageOptions): Promise { if (opts.message_reference) { permission.hasThrow("READ_MESSAGE_HISTORY"); // code below has to be redone when we add custom message routing and cross-channel replies - if (opts.message_reference.guild_id !== channel.guild_id) throw new HTTPError("You can only reference messages from this guild"); - if (opts.message_reference.channel_id !== opts.channel_id) throw new HTTPError("You can only reference messages from this channel"); + if (!guild.features.includes("CROSS_CHANNEL_REPLIES")) { + if (opts.message_reference.guild_id !== channel.guild_id) throw new HTTPError("You can only reference messages from this guild"); + if (opts.message_reference.channel_id !== opts.channel_id) throw new HTTPError("You can only reference messages from this channel"); + } // TODO: should be checked if the referenced message exists? // @ts-ignore message.type = MessageType.REPLY; From 26781e736c5877d31f7a1fbde3bebe188caa008a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erkin=20Alp=20G=C3=BCney?= Date: Wed, 12 Jan 2022 10:19:05 +0300 Subject: [PATCH 11/31] Update Guild.ts --- util/src/entities/Guild.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/util/src/entities/Guild.ts b/util/src/entities/Guild.ts index f4c94a642..00f92679b 100644 --- a/util/src/entities/Guild.ts +++ b/util/src/entities/Guild.ts @@ -330,6 +330,7 @@ export class Guild extends BaseClass { }).save(); // we have to create the role _after_ the guild because else we would get a "SQLITE_CONSTRAINT: FOREIGN KEY constraint failed" error + // TODO: make the @everyone a pseudorole that is dynamically generated at runtime so we can save storage await new Role({ id: guild_id, guild_id: guild_id, From 072a60fb03fbf5f261c0e9888ce49847e1a350d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erkin=20Alp=20G=C3=BCney?= Date: Wed, 12 Jan 2022 16:04:34 +0300 Subject: [PATCH 12/31] Fix the feature check --- api/src/util/handlers/Message.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/src/util/handlers/Message.ts b/api/src/util/handlers/Message.ts index dae6f7e8c..92bb23354 100644 --- a/api/src/util/handlers/Message.ts +++ b/api/src/util/handlers/Message.ts @@ -2,6 +2,7 @@ import { Channel, Embed, emitEvent, + Guild, Message, MessageCreateEvent, MessageUpdateEvent, @@ -81,6 +82,7 @@ export async function handleMessage(opts: MessageOptions): Promise { if (opts.message_reference) { permission.hasThrow("READ_MESSAGE_HISTORY"); // code below has to be redone when we add custom message routing and cross-channel replies + const guild = await Guild.findOneOrFail({ id: guild_id }); if (!guild.features.includes("CROSS_CHANNEL_REPLIES")) { if (opts.message_reference.guild_id !== channel.guild_id) throw new HTTPError("You can only reference messages from this guild"); if (opts.message_reference.channel_id !== opts.channel_id) throw new HTTPError("You can only reference messages from this channel"); From cc698225a0e6cab61363b3585bbab30d022c0207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erkin=20Alp=20G=C3=BCney?= Date: Wed, 12 Jan 2022 16:13:13 +0300 Subject: [PATCH 13/31] update defaults --- util/src/entities/Guild.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/util/src/entities/Guild.ts b/util/src/entities/Guild.ts index 00f92679b..6a1df4d6f 100644 --- a/util/src/entities/Guild.ts +++ b/util/src/entities/Guild.ts @@ -213,7 +213,7 @@ export class Guild extends BaseClass { owner: User; @Column({ nullable: true }) - preferred_locale?: string; // only community guilds can choose this + preferred_locale?: string; @Column({ nullable: true }) premium_subscription_count?: number; @@ -301,22 +301,22 @@ export class Guild extends BaseClass { name: body.name || "Fosscord", icon: await handleFile(`/icons/${guild_id}`, body.icon as string), region: Config.get().regions.default, - owner_id: body.owner_id, + owner_id: body.owner_id, // TODO: need to figure out a way for ownerless guilds and multiply-owned guilds afk_timeout: 300, - default_message_notifications: 0, + default_message_notifications: 1, // defaults effect: setting the push default at mentions-only will save a lot explicit_content_filter: 0, features: [], id: guild_id, max_members: 250000, max_presences: 250000, - max_video_channel_users: 25, + max_video_channel_users: 200, presence_count: 0, member_count: 0, // will automatically be increased by addMember() mfa_level: 0, preferred_locale: "en-US", premium_subscription_count: 0, premium_tier: 0, - system_channel_flags: 0, + system_channel_flags: 4, // defaults effect: suppress the setup tips to save performance unavailable: false, nsfw: false, nsfw_level: 0, @@ -326,7 +326,7 @@ export class Guild extends BaseClass { description: "No description", welcome_channels: [], }, - widget_enabled: false, + widget_enabled: true, // NB: don't set it as false to prevent artificial restrictions }).save(); // we have to create the role _after_ the guild because else we would get a "SQLITE_CONSTRAINT: FOREIGN KEY constraint failed" error @@ -337,6 +337,7 @@ export class Guild extends BaseClass { color: 0, hoist: false, managed: false, + // NB: in Fosscord, every role will be non-managed, as we use user-groups instead of roles for managed groups mentionable: false, name: "@everyone", permissions: String("2251804225"), @@ -358,7 +359,6 @@ export class Guild extends BaseClass { for (const channel of body.channels?.sort((a, b) => (a.parent_id ? 1 : -1))) { var id = ids.get(channel.id) || Snowflake.generate(); - // TODO: should we abort if parent_id is a category? (to disallow sub category channels) var parent_id = ids.get(channel.parent_id); await Channel.createChannel({ ...channel, guild_id, id, parent_id }, body.owner_id, { From 41fca13db2e88e4e2c53544658ee99cf1800f664 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Thu, 13 Jan 2022 18:45:23 +1100 Subject: [PATCH 14/31] Fix typo in commit 277b28c --- api/src/util/handlers/Message.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/util/handlers/Message.ts b/api/src/util/handlers/Message.ts index 92bb23354..216643686 100644 --- a/api/src/util/handlers/Message.ts +++ b/api/src/util/handlers/Message.ts @@ -82,7 +82,7 @@ export async function handleMessage(opts: MessageOptions): Promise { if (opts.message_reference) { permission.hasThrow("READ_MESSAGE_HISTORY"); // code below has to be redone when we add custom message routing and cross-channel replies - const guild = await Guild.findOneOrFail({ id: guild_id }); + const guild = await Guild.findOneOrFail({ id: channel.guild_id }); if (!guild.features.includes("CROSS_CHANNEL_REPLIES")) { if (opts.message_reference.guild_id !== channel.guild_id) throw new HTTPError("You can only reference messages from this guild"); if (opts.message_reference.channel_id !== opts.channel_id) throw new HTTPError("You can only reference messages from this channel"); From 4f6a1a8e12a04696692f61efa2df161b9b669848 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Thu, 13 Jan 2022 20:02:09 +0000 Subject: [PATCH 15/31] Add erlpack warning (#587) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add warning if erlpack is missing Co-authored-by: Erkin Alp Güney --- gateway/src/util/Send.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gateway/src/util/Send.ts b/gateway/src/util/Send.ts index 196d4205c..c8627b032 100644 --- a/gateway/src/util/Send.ts +++ b/gateway/src/util/Send.ts @@ -1,7 +1,9 @@ var erlpack: any; try { erlpack = require("@yukikaze-bot/erlpack"); -} catch (error) {} +} catch (error) { + console.log("Missing @yukikaze-bot/erlpack, electron-based desktop clients designed for discord.com will not be able to connect!"); +} import { Payload, WebSocket } from "@fosscord/gateway"; export async function Send(socket: WebSocket, data: Payload) { From aa38c188ea9e62c7dc8606938b126283457d9768 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erkin=20Alp=20G=C3=BCney?= Date: Fri, 14 Jan 2022 23:03:57 +0300 Subject: [PATCH 16/31] Further debranding of premium tiers --- .../skus/#sku_id/subscription-plans.ts | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/api/src/routes/store/published-listings/skus/#sku_id/subscription-plans.ts b/api/src/routes/store/published-listings/skus/#sku_id/subscription-plans.ts index 723a51607..d0b533d81 100644 --- a/api/src/routes/store/published-listings/skus/#sku_id/subscription-plans.ts +++ b/api/src/routes/store/published-listings/skus/#sku_id/subscription-plans.ts @@ -14,7 +14,7 @@ const skus = new Map([ interval_count: 1, tax_inclusive: true, sku_id: "521842865731534868", - currency: "usd", + currency: "eur", price: 0, price_tier: null }, @@ -25,7 +25,7 @@ const skus = new Map([ interval_count: 1, tax_inclusive: true, sku_id: "521842865731534868", - currency: "usd", + currency: "eur", price: 0, price_tier: null } @@ -36,23 +36,23 @@ const skus = new Map([ [ { id: "511651871736201216", - name: "Premium Classic Monthly", + name: "Individual Premium Tier 1 Monthly", interval: 1, interval_count: 1, tax_inclusive: true, sku_id: "521846918637420545", - currency: "usd", + currency: "eur", price: 0, price_tier: null }, { id: "511651876987469824", - name: "Premium Classic Yearly", + name: "Individual Premium Tier 1 Yearly", interval: 2, interval_count: 1, tax_inclusive: true, sku_id: "521846918637420545", - currency: "usd", + currency: "eur", price: 0, price_tier: null } @@ -63,34 +63,34 @@ const skus = new Map([ [ { id: "642251038925127690", - name: "Premium Quarterly", + name: "Individual Premium Tier 2 Quarterly", interval: 1, interval_count: 3, tax_inclusive: true, sku_id: "521847234246082599", - currency: "usd", + currency: "eur", price: 0, price_tier: null }, { id: "511651880837840896", - name: "Premium Monthly", + name: "Individual Premium Tier 2 Monthly", interval: 1, interval_count: 1, tax_inclusive: true, sku_id: "521847234246082599", - currency: "usd", + currency: "eur", price: 0, price_tier: null }, { id: "511651885459963904", - name: "Premium Yearly", + name: "Individual Premium Tier 2 Yearly", interval: 2, interval_count: 1, tax_inclusive: true, sku_id: "521847234246082599", - currency: "usd", + currency: "eur", price: 0, price_tier: null } @@ -101,25 +101,25 @@ const skus = new Map([ [ { id: "590665532894740483", - name: "Server Boost Monthly", + name: "Crowd Premium Monthly", interval: 1, interval_count: 1, tax_inclusive: true, sku_id: "590663762298667008", discount_price: 0, - currency: "usd", + currency: "eur", price: 0, price_tier: null }, { id: "590665538238152709", - name: "Server Boost Yearly", + name: "Crowd Premium Yearly", interval: 2, interval_count: 1, tax_inclusive: true, sku_id: "590663762298667008", discount_price: 0, - currency: "usd", + currency: "eur", price: 0, price_tier: null } From dbe88d5b188fc91c560da3b8a839b743acc543b0 Mon Sep 17 00:00:00 2001 From: Chris Chrome Date: Sun, 16 Jan 2022 23:51:04 -0500 Subject: [PATCH 17/31] Revert previous commit --- .../skus/#sku_id/subscription-plans.ts | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/api/src/routes/store/published-listings/skus/#sku_id/subscription-plans.ts b/api/src/routes/store/published-listings/skus/#sku_id/subscription-plans.ts index d0b533d81..723a51607 100644 --- a/api/src/routes/store/published-listings/skus/#sku_id/subscription-plans.ts +++ b/api/src/routes/store/published-listings/skus/#sku_id/subscription-plans.ts @@ -14,7 +14,7 @@ const skus = new Map([ interval_count: 1, tax_inclusive: true, sku_id: "521842865731534868", - currency: "eur", + currency: "usd", price: 0, price_tier: null }, @@ -25,7 +25,7 @@ const skus = new Map([ interval_count: 1, tax_inclusive: true, sku_id: "521842865731534868", - currency: "eur", + currency: "usd", price: 0, price_tier: null } @@ -36,23 +36,23 @@ const skus = new Map([ [ { id: "511651871736201216", - name: "Individual Premium Tier 1 Monthly", + name: "Premium Classic Monthly", interval: 1, interval_count: 1, tax_inclusive: true, sku_id: "521846918637420545", - currency: "eur", + currency: "usd", price: 0, price_tier: null }, { id: "511651876987469824", - name: "Individual Premium Tier 1 Yearly", + name: "Premium Classic Yearly", interval: 2, interval_count: 1, tax_inclusive: true, sku_id: "521846918637420545", - currency: "eur", + currency: "usd", price: 0, price_tier: null } @@ -63,34 +63,34 @@ const skus = new Map([ [ { id: "642251038925127690", - name: "Individual Premium Tier 2 Quarterly", + name: "Premium Quarterly", interval: 1, interval_count: 3, tax_inclusive: true, sku_id: "521847234246082599", - currency: "eur", + currency: "usd", price: 0, price_tier: null }, { id: "511651880837840896", - name: "Individual Premium Tier 2 Monthly", + name: "Premium Monthly", interval: 1, interval_count: 1, tax_inclusive: true, sku_id: "521847234246082599", - currency: "eur", + currency: "usd", price: 0, price_tier: null }, { id: "511651885459963904", - name: "Individual Premium Tier 2 Yearly", + name: "Premium Yearly", interval: 2, interval_count: 1, tax_inclusive: true, sku_id: "521847234246082599", - currency: "eur", + currency: "usd", price: 0, price_tier: null } @@ -101,25 +101,25 @@ const skus = new Map([ [ { id: "590665532894740483", - name: "Crowd Premium Monthly", + name: "Server Boost Monthly", interval: 1, interval_count: 1, tax_inclusive: true, sku_id: "590663762298667008", discount_price: 0, - currency: "eur", + currency: "usd", price: 0, price_tier: null }, { id: "590665538238152709", - name: "Crowd Premium Yearly", + name: "Server Boost Yearly", interval: 2, interval_count: 1, tax_inclusive: true, sku_id: "590663762298667008", discount_price: 0, - currency: "eur", + currency: "usd", price: 0, price_tier: null } From d5987856450545ab551b8737a8a9c6e86692eafd Mon Sep 17 00:00:00 2001 From: Featyre Date: Sun, 23 Jan 2022 02:03:14 +0800 Subject: [PATCH 18/31] Branding updates --- api/assets/fosscord-login.css | 6 +++--- api/assets/fosscord.css | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/api/assets/fosscord-login.css b/api/assets/fosscord-login.css index bc32b82ea..34cf542bf 100644 --- a/api/assets/fosscord-login.css +++ b/api/assets/fosscord-login.css @@ -22,10 +22,10 @@ h3.title-jXR8lp.marginBottom8-AtZOdT.base-1x0h_U.size24-RIRrxO::after { /* Logo in top left when bg removed */ #app-mount > div.app-1q1i1E > div > a { /* replace me: original dimensions: 130x36 */ - background: url(https://raw.githubusercontent.com/fosscord/fosscord/9900329e5ef2c17bdeb6893e04c0511f72027f97/assets/logo/temp.svg); + background: url(https://raw.githubusercontent.com/fosscord/fosscord/master/assets-rebrand/svg/Fosscord-Wordmark-Gradient.svg); + width: 130px; + height: 23px; background-size: contain; - width: 128px; - height: 128px; border-radius: 50%; } diff --git a/api/assets/fosscord.css b/api/assets/fosscord.css index 6a8b4c64e..6078fdeb4 100644 --- a/api/assets/fosscord.css +++ b/api/assets/fosscord.css @@ -13,10 +13,14 @@ /* home button icon */ #app-mount > div.app-1q1i1E > div > div.layers-3iHuyZ.layers-3q14ss > div > div > nav > ul > div.scroller-1Bvpku.none-2Eo-qx.scrollerBase-289Jih > div.tutorialContainer-2sGCg9 > div > div.listItemWrapper-KhRmzM > div > svg > foreignObject > div > div { - background-image: url(https://raw.githubusercontent.com/fosscord/fosscord/9900329e5ef2c17bdeb6893e04c0511f72027f97/assets/logo/temp.svg); + background-image: url(https://raw.githubusercontent.com/fosscord/fosscord/master/assets-rebrand/svg/Fosscord-Icon-Rounded-Subtract.svg); background-size: contain; border-radius: 50%; } + +#app-mount > div.app-1q1i1E > div > div.layers-3iHuyZ.layers-3q14ss > div > div > nav > ul > div.scroller-1Bvpku.none-2Eo-qx.scrollerBase-289Jih > div.tutorialContainer-2sGCg9 > div > div.listItemWrapper-KhRmzM > div > svg > foreignObject > div > div, #app-mount > div.app-1q1i1E > div > div.layers-3iHuyZ.layers-3q14ss > div > div > nav > ul > div.scroller-1Bvpku.none-2Eo-qx.scrollerBase-289Jih > div.tutorialContainer-2sGCg9 > div > div.listItemWrapper-KhRmzM > div > svg > foreignObject > div > div:hover { + background-color: white; +} /* Login QR */ #app-mount > div.app-1q1i1E > div > div > div > div > form > div > div > div.transitionGroup-aR7y1d.qrLogin-1AOZMt, #app-mount > div.app-1q1i1E > div > div > div > div > form > div > div > div.verticalSeparator-3huAjp, From 46860979be03995b4ada511598cab0b539138485 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 22 Jan 2022 23:09:07 +0000 Subject: [PATCH 19/31] Bump node-fetch from 2.6.2 to 3.1.1 in /api Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.2 to 3.1.1. - [Release notes](https://github.com/node-fetch/node-fetch/releases) - [Changelog](https://github.com/node-fetch/node-fetch/blob/main/docs/CHANGELOG.md) - [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.2...v3.1.1) --- updated-dependencies: - dependency-name: node-fetch dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- api/package-lock.json | Bin 810634 -> 830717 bytes api/package.json | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/api/package-lock.json b/api/package-lock.json index aa0c07c5ac7e42777567eeb0b1192af1eb83d085..28af2e8b1ca5b3b2a69c3a28342ce75f47ca53da 100644 GIT binary patch delta 11874 zcmdT~33O9szCZUSxw$v#MoUWzbY&}qHhajyjGg7q?VBZchnsXMH8?q zh82u|$Z6rit3hE-dOewjUx@_s(jrQ6AyN86PU-k9RLy^Y=L1Ze7XLI4&UJIs=~td! znZEtWgCK8Ud&^+WMtlLR@5i~&<`wW^MVFuuj`nibF_h!0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[PATCH 20/31] Bump node-fetch from 2.6.2 to 3.1.1 in /gateway Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.2 to 3.1.1. - [Release notes](https://github.com/node-fetch/node-fetch/releases) - [Changelog](https://github.com/node-fetch/node-fetch/blob/main/docs/CHANGELOG.md) - [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.2...v3.1.1) --- updated-dependencies: - dependency-name: node-fetch dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- gateway/package-lock.json | Bin 432728 -> 543051 bytes gateway/package.json | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/gateway/package-lock.json b/gateway/package-lock.json index a9813b6f2685458f684fca6a70ebed92a727a058..d02106f803bfbede3f5b3658e822a962e7cd2c1d 100644 GIT binary patch delta 26502 zcmd75cX(CRwm1Cjy-FHMHmM|}A`n_CC3HdykWMEtgpd#*kdQzM5K014qz9K_fRsc9 zW~+bwSZW^tN@_|@rE&+`?99B(yqvsgbU(@D zx_gNdvxWBem)t2T#2l)H?6T0q{?b-TpKlJ*w!LwRW)7%t^Rvc}klr(CmbD&Q=q^9X z?_wefj;ZfZLrrbW0c2@x_R)HM;-VdR612N}^;vhiyVcx%ci_=xCaTPm+_l=>?X-Yf zEwzF#=|u@-hJTs!;WdYUy}c4v6)E<5gKqPgE; zT^&s^#*w0ish)JFk+~V&TQ6Dkfz-?1tkRg9W{nNU!j0)pYm*~AxoIA&FHaMC$lLj> zPN!#?XlW1-tvqwvT)!NZFIDY!zj3~aiQaIF zA1HQo=QVR7@1_%Bcdt)wIM91fFlUe24G!dPWA3;6;jKSxDPS@qLkLCXnp^Ge@^fPc z3eGbKNoi)2?Vfy7xTPKmtJPv!Xdr-@RZ4r-Xt>m(m*^+3}fHsn;rS<#BRR!P5Thn{h#vx803XxGaP zHmQSLsn-PAkIFVnBXpX#qNof>ru;XhSbdPSV5lix(LO%hlFnT-`B|@yGF98r>${DO zS+{4H7JAlWU`;GB{VG%0D}3=FYg(zP{J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r^EzhH30}*x1rbiY=&Q!|C>z>dTTbzY z*0mxEPd&{usMQ&sQa$5wmVfFxgwIjWL2RSW!G`zgdH@0q>P1M{jqK-9P6{!NKhHA- zYs@Eq;c1-qU9NF%OQ#~~_@)J%2^uDza{uK_z<9VA#q^R=;5+OOXgPv;F!^46%$^5_ zsfpxqjW-pd`0^SeV(fLNZk@c&F9;;lZ$gy9=nhAzjm^YAc{lFzWbG%afhgZYXx3fm zPlJ1wcY=Z;oS{HVRC^kWhq_VLeQ2+sBX6j^5uHdQuWR?Vx`^vZ80=~=^`q| z)Adq&u$istcv&D4n|NJsXt8{KjVPLqQ~W4nDgL5hkh?B%HeNpNtg~x-=ucW#H>9(v zYCC$;Q?CgCW`LKzol)1B`1^!`0Xq0)#qFZLNY(K9K@g<{>Q>eT?F!WU)07~+sf*-B zLy<1#c2`5C^p^zd^Chp~u6(L1SiH0g(WT9I3)P+C3YC=k)6QNv4#lq4IebOE(3)_k z+u?9^g7?teI^=| z{VKABU#-ams;Hx{H_z171Et5I$@TS7bo&AiFqaHd4=d8;T7Mov*@=1`S!>|KmLwW< z)uxjpNyiJe>TGjc16}w9b96%;F1$QhZ$kYV=`(6%l;qIs(sT!qJLdojUpE6x$?fKP z2DV9~Lw*uVE8oRutN3dHFS@e;rH(7|h&Ql4w5+Ax?vYqCwUz#Ab*!mv7NqF-a7SC`kj-9~aw1X*{Q-xdgn)zo(S5b{mcj|m$Zm!?P2gEZYrXPr6r)^r_drIj>+XYN)7 zGu`^ks~O$t2Pc!g1zo{z6^Mf38=M9S=wk8jQQ&5G)bV1jf;njS`^d3xTvs`b>ZGHe vZ)N4DI=ST9E#Ce$Wp#nN-t3|$2_(8^Aay9~s^i0^4864_i$JQ%(0lwJFB(~x diff --git a/gateway/package.json b/gateway/package.json index f976b3e7a..7daddfc0d 100644 --- a/gateway/package.json +++ b/gateway/package.json @@ -32,7 +32,7 @@ "jsonwebtoken": "^8.5.1", "lambert-server": "^1.2.11", "missing-native-js-functions": "^1.2.18", - "node-fetch": "^2.6.1", + "node-fetch": "^3.1.1", "proxy-agent": "^5.0.0", "typeorm": "^0.2.37", "ws": "^7.4.2" From bb07db99790cb052b741d4fc28d38cb606f1ee6c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 23 Jan 2022 04:42:07 +0000 Subject: [PATCH 21/31] Bump node-fetch from 2.6.2 to 2.6.7 in /util Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.2 to 2.6.7. - [Release notes](https://github.com/node-fetch/node-fetch/releases) - [Changelog](https://github.com/node-fetch/node-fetch/blob/main/docs/CHANGELOG.md) - [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.2...v2.6.7) --- updated-dependencies: - dependency-name: node-fetch dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- util/package-lock.json | Bin 491038 -> 497311 bytes util/package.json | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/util/package-lock.json b/util/package-lock.json index c6f2ed6fc7f3ab3f4e94143563280098d4bfec91..2b33b7de44ff37d98a5d8cd383b31bbd02e352fa 100644 GIT binary patch delta 3360 zcmcguX;hTw6+Z8`ydN{ezJm-5L#0M!HWpDKg2DhQ!y-#TrR*RM3^JetCd4(`R8ccW zt~Cbmm_?4Fv^2i4MuR;{JZdGH6I-)XJ=WcbTdEBL{pR~nCjRiWKic^*=X~Tg`724%tDk~4KC~qjOQchPW3w5e!)l};!ik+~y)KqFRn(EEMyjG=A zX_Ql>68@)zD}7iF+X)@g+e|h61wQFQp^#oid0XSpyMprx<{td^A{E;!Kj(zt_|CD# z-uUx=2o86lShyTZt05zhb?E)*t4|SJ+k|5Iqk-_&WQ3t-I(jIc@4S#504*OOFZi+x z{jyj3s2G8)5i20$EENQX0i>{+9tBwY9uErpVPG5OWbGTmaAp-9+B@>2;<>wU+OaqO z$z1faZBD(1pJoX=LgD+*C?`nYPWi)*J+#uQ?w1ReH~(}I!jkAvaM^>rds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;zZe6Sc!i^3j&h%3!nc%L%$xD%C2^k)?57oQDnYsH1$@Jz9RE69 v>`PKMg}|b7%n1FQ_ Date: Sun, 23 Jan 2022 04:42:07 +0000 Subject: [PATCH 22/31] Bump node-fetch from 2.6.6 to 2.6.7 in /cdn Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.6 to 2.6.7. - [Release notes](https://github.com/node-fetch/node-fetch/releases) - [Changelog](https://github.com/node-fetch/node-fetch/blob/main/docs/CHANGELOG.md) - [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.6...v2.6.7) --- updated-dependencies: - dependency-name: node-fetch dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- cdn/package-lock.json | Bin 500032 -> 500169 bytes cdn/package.json | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/cdn/package-lock.json b/cdn/package-lock.json index 367f411e68a970a65c9bf3e0ca71f00b999847b5..a6c2df2d47d99fcb8fc19e17c0d4d401913cb995 100644 GIT binary patch delta 391 zcmX?bNbclexd~e)Pi9q`Ea1jD{hv7t$Hu2#OpNB64VdkjC(ANRPhQSuGCgcEqsVlp ze=Hu&((LWh?2JInv|XB=`I6oABpW9EX>ZtAr(3^Z6Q5ob$*2$-mE{}Y=9(5(VVb2~ zX;kTEZ0cQAVOs2Fp6yaqQRM6qGo1eMHIohpOmzChHYV$K19#@_2JS5DwxM{Y9q5_uPXAbszNDK6rZ41SmjU@e WVfuu}Y+}>*c`~zaS9r;$umb?@GKBvC delta 331 zcmX?kSnj|fxd~gCJ%gPmPmERDct41V(Qva7vpw@ Date: Sun, 23 Jan 2022 04:45:47 +0000 Subject: [PATCH 23/31] Bump node-fetch from 2.6.5 to 2.6.7 in /bundle Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.5 to 2.6.7. - [Release notes](https://github.com/node-fetch/node-fetch/releases) - [Changelog](https://github.com/node-fetch/node-fetch/blob/main/docs/CHANGELOG.md) - [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.5...v2.6.7) --- updated-dependencies: - dependency-name: node-fetch dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- bundle/package-lock.json | Bin 606883 -> 607272 bytes bundle/package.json | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/bundle/package-lock.json b/bundle/package-lock.json index e8b99037923888c5a45a3d5e0cb11678489edec6..d026e7c7785fe4ff8a10d165315f79892d994f10 100644 GIT binary patch delta 603 zcmZ47s=A^>bwd#=qxt4y*4eBRD}|U73o<88l$)O3%_1w1lbM{FSDdP3rJ&><;1gy% z{o^$zmFad`Z0wT_*qtWVGjdL!Wx*D^{e%@;FXQA5yla?^^$a)1^L=LqnUtK8H*umS zD_G}bK^OJu5A4|THVX(pW@I# zDXF??sU^u7`nviEj;@iOnV$LdjWZbKL!+{M1KeEG!YWL&v@4A&-Hc7Wt13*3-ORIH zswzrdvdpS7Jxtu(lKcxS%&WXzqWmf>DqSnQJd+Ge{oUP6{BlYxJw4n!eVwv{a!d@v zQp%G3Qj#Wrv{0CCE5V^KEsjxgdd^B_k?FrLu_y?n<|XH+Wag!VLN(4n&v3e9Hlq#) zOmuo-4~zBmh84_Q?F&{i12N0?1uI$iOa_JQ_IO)1A7ET<2L@gx6T<85{;q7>{ax7; TFAcPx+Z81^wkt|-HfaF>XS~JN delta 472 zcmZ3{p}M$Lbwd&B^tcX2?#;EV6Imy}cIKX*@R5;c`f~v$*~xL-+{~WA&XW^^ zJkN@B*YwmXvm{IR^zewJ?5Hf$$SCu)3T>kzOOr$+SMAWuqT&KGkK%xkfSml?v=on$ zf)afvgX9$Nvdr@A{6t@~g37W`|LGs+F)2=eu#(w#@}G-h)9UDm)3Rz7dCAsh_cxd wa?>NuvG7gq;nHb8;KsK7fE&BoC6G5lY2l56>4I Date: Sun, 23 Jan 2022 04:45:21 +0000 Subject: [PATCH 24/31] Bump node-fetch from 2.6.6 to 2.6.7 in /api/scripts/stresstest Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.6 to 2.6.7. - [Release notes](https://github.com/node-fetch/node-fetch/releases) - [Changelog](https://github.com/node-fetch/node-fetch/blob/main/docs/CHANGELOG.md) - [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.6...v2.6.7) --- updated-dependencies: - dependency-name: node-fetch dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- api/scripts/stresstest/package-lock.json | Bin 29134 -> 29271 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/api/scripts/stresstest/package-lock.json b/api/scripts/stresstest/package-lock.json index ca84a8cf4fff99e8a6aa59d3771c3fe512eb9502..81c9b817abcc9af86421cec78987cefed923e50b 100644 GIT binary patch delta 349 zcmX^2nDP1(#trLL7|ka$YUxeBry>Jn84AgVMP>O0xVffk63CK;IeySthA<&;=@dboM|I%Nmt zm>7nolqLJ6Bn3_`P|e}i;o{`vR4PbKEpnNh$R(PRnwOlPl9`vTWTl`KXP{@OXP^X9 zQH!K5wIDSQq%JeH*f+H#5vZ~nq=ZumNiRf%Qz^foBr`uRF$buqq^L9%tgd#lAglD| PPpZD=bn@t?xO2h)x-x4D delta 237 zcmccqgz?;C#trLL7|kY64Aq-_PelgEG8B>zi?Yx+D+|gA33bj0PVr3lO*A#kst7d6 zDJs|Zsx%Gu4>vUMPfBz&G1m`r%_(;DGfFlM$g@ZaNq2J(&(qILDzAzNakVHcFEWg* nsxY!BD^5+0aCMwqpqeweTt#eiwVJOvz3dc>mfpN1ZnH1|V}?)9 From f9ff5b35f3b65d72302ff131cdd6375d572c1842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erkin=20Alp=20G=C3=BCney?= Date: Sun, 23 Jan 2022 17:46:04 +0300 Subject: [PATCH 25/31] Closed-join guilds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves #537 Signed-off-by: Erkin Alp Güney --- api/src/routes/invites/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/src/routes/invites/index.ts b/api/src/routes/invites/index.ts index ac8131269..37e9e05a3 100644 --- a/api/src/routes/invites/index.ts +++ b/api/src/routes/invites/index.ts @@ -19,7 +19,8 @@ router.post("/:code", route({}), async (req: Request, res: Response) => { const { features } = await Guild.findOneOrFail({ id: guild_id}); const { public_flags } = await User.findOneOrFail({ id: req.user_id }); - if(features.includes("INTERNAL_EMPLOYEE_ONLY") && (public_flags & 1) !== 1) throw new HTTPError("The Maze isn't meant for you.", 401) + if(features.includes("INTERNAL_EMPLOYEE_ONLY") && (public_flags & 1) !== 1) throw new HTTPError("Only intended for the staff of this server.", 401); + if(features.includes("INVITES_CLOSED")) throw new HTTPError("Sorry, this guild has joins closed.", 403); const invite = await Invite.joinGuild(req.user_id, code); From 35c7489f72feb3c432d67e2d6d1d0ef8c70c08a4 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Fri, 14 Jan 2022 01:20:26 +1100 Subject: [PATCH 26/31] Added `ILLEGAL_CHANNEL_NAMES` and `NULL_CHANNEL_NAMES` guild feature flags --- util/src/entities/Channel.ts | 682 ++++++++++++++------------- util/src/util/InvisibleCharacters.ts | 55 +++ util/src/util/index.ts | 1 + 3 files changed, 406 insertions(+), 332 deletions(-) create mode 100644 util/src/util/InvisibleCharacters.ts diff --git a/util/src/entities/Channel.ts b/util/src/entities/Channel.ts index 4036b5d66..e7e0bace5 100644 --- a/util/src/entities/Channel.ts +++ b/util/src/entities/Channel.ts @@ -1,332 +1,350 @@ -import { Column, Entity, JoinColumn, ManyToOne, OneToMany, RelationId } from "typeorm"; -import { BaseClass } from "./BaseClass"; -import { Guild } from "./Guild"; -import { PublicUserProjection, User } from "./User"; -import { HTTPError } from "lambert-server"; -import { containsAll, emitEvent, getPermission, Snowflake, trimSpecial } from "../util"; -import { ChannelCreateEvent, ChannelRecipientRemoveEvent } from "../interfaces"; -import { Recipient } from "./Recipient"; -import { Message } from "./Message"; -import { ReadState } from "./ReadState"; -import { Invite } from "./Invite"; -import { VoiceState } from "./VoiceState"; -import { Webhook } from "./Webhook"; -import { DmChannelDTO } from "../dtos"; - -export enum ChannelType { - GUILD_TEXT = 0, // a text channel within a server - DM = 1, // a direct message between users - GUILD_VOICE = 2, // a voice channel within a server - GROUP_DM = 3, // a direct message between multiple users - GUILD_CATEGORY = 4, // an organizational category that contains up to 50 channels - GUILD_NEWS = 5, // a channel that users can follow and crosspost into their own server - GUILD_STORE = 6, // a channel in which game developers can sell their game on Discord - // TODO: what are channel types between 7-9? - GUILD_NEWS_THREAD = 10, // a temporary sub-channel within a GUILD_NEWS channel - GUILD_PUBLIC_THREAD = 11, // a temporary sub-channel within a GUILD_TEXT channel - GUILD_PRIVATE_THREAD = 12, // a temporary sub-channel within a GUILD_TEXT channel that is only viewable by those invited and those with the MANAGE_THREADS permission - GUILD_STAGE_VOICE = 13, // a voice channel for hosting events with an audience -} - -@Entity("channels") -export class Channel extends BaseClass { - @Column() - created_at: Date; - - @Column({ nullable: true }) - name?: string; - - @Column({ type: "text", nullable: true }) - icon?: string | null; - - @Column({ type: "int" }) - type: ChannelType; - - @OneToMany(() => Recipient, (recipient: Recipient) => recipient.channel, { - cascade: true, - orphanedRowAction: "delete", - }) - recipients?: Recipient[]; - - @Column({ nullable: true }) - last_message_id: string; - - @Column({ nullable: true }) - @RelationId((channel: Channel) => channel.guild) - guild_id?: string; - - @JoinColumn({ name: "guild_id" }) - @ManyToOne(() => Guild, { - onDelete: "CASCADE", - }) - guild: Guild; - - @Column({ nullable: true }) - @RelationId((channel: Channel) => channel.parent) - parent_id: string; - - @JoinColumn({ name: "parent_id" }) - @ManyToOne(() => Channel) - parent?: Channel; - - // only for group dms - @Column({ nullable: true }) - @RelationId((channel: Channel) => channel.owner) - owner_id: string; - - @JoinColumn({ name: "owner_id" }) - @ManyToOne(() => User) - owner: User; - - @Column({ nullable: true }) - last_pin_timestamp?: number; - - @Column({ nullable: true }) - default_auto_archive_duration?: number; - - @Column({ nullable: true }) - position?: number; - - @Column({ type: "simple-json", nullable: true }) - permission_overwrites?: ChannelPermissionOverwrite[]; - - @Column({ nullable: true }) - video_quality_mode?: number; - - @Column({ nullable: true }) - bitrate?: number; - - @Column({ nullable: true }) - user_limit?: number; - - @Column({ nullable: true }) - nsfw?: boolean; - - @Column({ nullable: true }) - rate_limit_per_user?: number; - - @Column({ nullable: true }) - topic?: string; - - @OneToMany(() => Invite, (invite: Invite) => invite.channel, { - cascade: true, - orphanedRowAction: "delete", - }) - invites?: Invite[]; - - @OneToMany(() => Message, (message: Message) => message.channel, { - cascade: true, - orphanedRowAction: "delete", - }) - messages?: Message[]; - - @OneToMany(() => VoiceState, (voice_state: VoiceState) => voice_state.channel, { - cascade: true, - orphanedRowAction: "delete", - }) - voice_states?: VoiceState[]; - - @OneToMany(() => ReadState, (read_state: ReadState) => read_state.channel, { - cascade: true, - orphanedRowAction: "delete", - }) - read_states?: ReadState[]; - - @OneToMany(() => Webhook, (webhook: Webhook) => webhook.channel, { - cascade: true, - orphanedRowAction: "delete", - }) - webhooks?: Webhook[]; - - // TODO: DM channel - static async createChannel( - channel: Partial, - user_id: string = "0", - opts?: { - keepId?: boolean; - skipExistsCheck?: boolean; - skipPermissionCheck?: boolean; - skipEventEmit?: boolean; - } - ) { - if (!opts?.skipPermissionCheck) { - // Always check if user has permission first - const permissions = await getPermission(user_id, channel.guild_id); - permissions.hasThrow("MANAGE_CHANNELS"); - } - - switch (channel.type) { - case ChannelType.GUILD_TEXT: - case ChannelType.GUILD_VOICE: - if (channel.parent_id && !opts?.skipExistsCheck) { - const exists = await Channel.findOneOrFail({ id: channel.parent_id }); - if (!exists) throw new HTTPError("Parent id channel doesn't exist", 400); - if (exists.guild_id !== channel.guild_id) - throw new HTTPError("The category channel needs to be in the guild"); - } - break; - case ChannelType.GUILD_CATEGORY: - break; - case ChannelType.DM: - case ChannelType.GROUP_DM: - throw new HTTPError("You can't create a dm channel in a guild"); - // TODO: check if guild is community server - case ChannelType.GUILD_STORE: - case ChannelType.GUILD_NEWS: - default: - throw new HTTPError("Not yet supported"); - } - - if (!channel.permission_overwrites) channel.permission_overwrites = []; - // TODO: auto generate position - - channel = { - ...channel, - ...(!opts?.keepId && { id: Snowflake.generate() }), - created_at: new Date(), - position: channel.position || 0, - }; - - await Promise.all([ - new Channel(channel).save(), - !opts?.skipEventEmit - ? emitEvent({ - event: "CHANNEL_CREATE", - data: channel, - guild_id: channel.guild_id, - } as ChannelCreateEvent) - : Promise.resolve(), - ]); - - return channel; - } - - static async createDMChannel(recipients: string[], creator_user_id: string, name?: string) { - recipients = recipients.unique().filter((x) => x !== creator_user_id); - const otherRecipientsUsers = await User.find({ where: recipients.map((x) => ({ id: x })) }); - - // TODO: check config for max number of recipients - if (otherRecipientsUsers.length !== recipients.length) { - throw new HTTPError("Recipient/s not found"); - } - - const type = recipients.length === 1 ? ChannelType.DM : ChannelType.GROUP_DM; - - let channel = null; - - const channelRecipients = [...recipients, creator_user_id]; - - const userRecipients = await Recipient.find({ - where: { user_id: creator_user_id }, - relations: ["channel", "channel.recipients"], - }); - - for (let ur of userRecipients) { - let re = ur.channel.recipients!.map((r) => r.user_id); - if (re.length === channelRecipients.length) { - if (containsAll(re, channelRecipients)) { - if (channel == null) { - channel = ur.channel; - await ur.assign({ closed: false }).save(); - } - } - } - } - - if (channel == null) { - name = trimSpecial(name); - - channel = await new Channel({ - name, - type, - owner_id: type === ChannelType.DM ? undefined : creator_user_id, - created_at: new Date(), - last_message_id: null, - recipients: channelRecipients.map( - (x) => - new Recipient({ user_id: x, closed: !(type === ChannelType.GROUP_DM || x === creator_user_id) }) - ), - }).save(); - } - - const channel_dto = await DmChannelDTO.from(channel); - - if (type === ChannelType.GROUP_DM) { - for (let recipient of channel.recipients!) { - await emitEvent({ - event: "CHANNEL_CREATE", - data: channel_dto.excludedRecipients([recipient.user_id]), - user_id: recipient.user_id, - }); - } - } else { - await emitEvent({ event: "CHANNEL_CREATE", data: channel_dto, user_id: creator_user_id }); - } - - return channel_dto.excludedRecipients([creator_user_id]); - } - - static async removeRecipientFromChannel(channel: Channel, user_id: string) { - await Recipient.delete({ channel_id: channel.id, user_id: user_id }); - channel.recipients = channel.recipients?.filter((r) => r.user_id !== user_id); - - if (channel.recipients?.length === 0) { - await Channel.deleteChannel(channel); - await emitEvent({ - event: "CHANNEL_DELETE", - data: await DmChannelDTO.from(channel, [user_id]), - user_id: user_id, - }); - return; - } - - await emitEvent({ - event: "CHANNEL_DELETE", - data: await DmChannelDTO.from(channel, [user_id]), - user_id: user_id, - }); - - //If the owner leave we make the first recipient in the list the new owner - if (channel.owner_id === user_id) { - channel.owner_id = channel.recipients!.find((r) => r.user_id !== user_id)!.user_id; //Is there a criteria to choose the new owner? - await emitEvent({ - event: "CHANNEL_UPDATE", - data: await DmChannelDTO.from(channel, [user_id]), - channel_id: channel.id, - }); - } - - await channel.save(); - - await emitEvent({ - event: "CHANNEL_RECIPIENT_REMOVE", - data: { - channel_id: channel.id, - user: await User.findOneOrFail({ where: { id: user_id }, select: PublicUserProjection }), - }, - channel_id: channel.id, - } as ChannelRecipientRemoveEvent); - } - - static async deleteChannel(channel: Channel) { - await Message.delete({ channel_id: channel.id }); //TODO we should also delete the attachments from the cdn but to do that we need to move cdn.ts in util - //TODO before deleting the channel we should check and delete other relations - await Channel.delete({ id: channel.id }); - } - - isDm() { - return this.type === ChannelType.DM || this.type === ChannelType.GROUP_DM; - } -} - -export interface ChannelPermissionOverwrite { - allow: string; - deny: string; - id: string; - type: ChannelPermissionOverwriteType; -} - -export enum ChannelPermissionOverwriteType { - role = 0, - member = 1, -} +import { Column, Entity, JoinColumn, ManyToOne, OneToMany, RelationId } from "typeorm"; +import { BaseClass } from "./BaseClass"; +import { Guild } from "./Guild"; +import { PublicUserProjection, User } from "./User"; +import { HTTPError } from "lambert-server"; +import { containsAll, emitEvent, getPermission, Snowflake, trimSpecial, InvisibleCharacters } from "../util"; +import { ChannelCreateEvent, ChannelRecipientRemoveEvent } from "../interfaces"; +import { Recipient } from "./Recipient"; +import { Message } from "./Message"; +import { ReadState } from "./ReadState"; +import { Invite } from "./Invite"; +import { VoiceState } from "./VoiceState"; +import { Webhook } from "./Webhook"; +import { DmChannelDTO } from "../dtos"; + +export enum ChannelType { + GUILD_TEXT = 0, // a text channel within a server + DM = 1, // a direct message between users + GUILD_VOICE = 2, // a voice channel within a server + GROUP_DM = 3, // a direct message between multiple users + GUILD_CATEGORY = 4, // an organizational category that contains up to 50 channels + GUILD_NEWS = 5, // a channel that users can follow and crosspost into their own server + GUILD_STORE = 6, // a channel in which game developers can sell their game on Discord + // TODO: what are channel types between 7-9? + GUILD_NEWS_THREAD = 10, // a temporary sub-channel within a GUILD_NEWS channel + GUILD_PUBLIC_THREAD = 11, // a temporary sub-channel within a GUILD_TEXT channel + GUILD_PRIVATE_THREAD = 12, // a temporary sub-channel within a GUILD_TEXT channel that is only viewable by those invited and those with the MANAGE_THREADS permission + GUILD_STAGE_VOICE = 13, // a voice channel for hosting events with an audience +} + +@Entity("channels") +export class Channel extends BaseClass { + @Column() + created_at: Date; + + @Column({ nullable: true }) + name?: string; + + @Column({ type: "text", nullable: true }) + icon?: string | null; + + @Column({ type: "int" }) + type: ChannelType; + + @OneToMany(() => Recipient, (recipient: Recipient) => recipient.channel, { + cascade: true, + orphanedRowAction: "delete", + }) + recipients?: Recipient[]; + + @Column({ nullable: true }) + last_message_id: string; + + @Column({ nullable: true }) + @RelationId((channel: Channel) => channel.guild) + guild_id?: string; + + @JoinColumn({ name: "guild_id" }) + @ManyToOne(() => Guild, { + onDelete: "CASCADE", + }) + guild: Guild; + + @Column({ nullable: true }) + @RelationId((channel: Channel) => channel.parent) + parent_id: string; + + @JoinColumn({ name: "parent_id" }) + @ManyToOne(() => Channel) + parent?: Channel; + + // only for group dms + @Column({ nullable: true }) + @RelationId((channel: Channel) => channel.owner) + owner_id: string; + + @JoinColumn({ name: "owner_id" }) + @ManyToOne(() => User) + owner: User; + + @Column({ nullable: true }) + last_pin_timestamp?: number; + + @Column({ nullable: true }) + default_auto_archive_duration?: number; + + @Column({ nullable: true }) + position?: number; + + @Column({ type: "simple-json", nullable: true }) + permission_overwrites?: ChannelPermissionOverwrite[]; + + @Column({ nullable: true }) + video_quality_mode?: number; + + @Column({ nullable: true }) + bitrate?: number; + + @Column({ nullable: true }) + user_limit?: number; + + @Column({ nullable: true }) + nsfw?: boolean; + + @Column({ nullable: true }) + rate_limit_per_user?: number; + + @Column({ nullable: true }) + topic?: string; + + @OneToMany(() => Invite, (invite: Invite) => invite.channel, { + cascade: true, + orphanedRowAction: "delete", + }) + invites?: Invite[]; + + @OneToMany(() => Message, (message: Message) => message.channel, { + cascade: true, + orphanedRowAction: "delete", + }) + messages?: Message[]; + + @OneToMany(() => VoiceState, (voice_state: VoiceState) => voice_state.channel, { + cascade: true, + orphanedRowAction: "delete", + }) + voice_states?: VoiceState[]; + + @OneToMany(() => ReadState, (read_state: ReadState) => read_state.channel, { + cascade: true, + orphanedRowAction: "delete", + }) + read_states?: ReadState[]; + + @OneToMany(() => Webhook, (webhook: Webhook) => webhook.channel, { + cascade: true, + orphanedRowAction: "delete", + }) + webhooks?: Webhook[]; + + // TODO: DM channel + static async createChannel( + channel: Partial, + user_id: string = "0", + opts?: { + keepId?: boolean; + skipExistsCheck?: boolean; + skipPermissionCheck?: boolean; + skipEventEmit?: boolean; + skipNameChecks?: boolean; + } + ) { + if (!opts?.skipPermissionCheck) { + // Always check if user has permission first + const permissions = await getPermission(user_id, channel.guild_id); + permissions.hasThrow("MANAGE_CHANNELS"); + } + + if (!opts?.skipNameChecks) { + const guild = await Guild.findOneOrFail({ id: channel.guild_id }); + if (!guild.features.includes("ILLEGAL_CHANNEL_NAMES") && channel.name) { + for (var character of InvisibleCharacters) + channel.name = channel.name.split(character).join("-"); + + channel.name = channel.name.split(/\-+/g).join("-"); //replace multiple occurances with just one + channel.name = channel.name.split("-").filter(Boolean).join("-"); //trim '-' character + } + + if (!guild.features.includes("NULL_CHANNEL_NAMES")) { + if (channel.name) channel.name = channel.name.trim(); + + if (!channel.name) throw new HTTPError("Channel name cannot be empty."); + } + } + + switch (channel.type) { + case ChannelType.GUILD_TEXT: + case ChannelType.GUILD_VOICE: + if (channel.parent_id && !opts?.skipExistsCheck) { + const exists = await Channel.findOneOrFail({ id: channel.parent_id }); + if (!exists) throw new HTTPError("Parent id channel doesn't exist", 400); + if (exists.guild_id !== channel.guild_id) + throw new HTTPError("The category channel needs to be in the guild"); + } + break; + case ChannelType.GUILD_CATEGORY: + break; + case ChannelType.DM: + case ChannelType.GROUP_DM: + throw new HTTPError("You can't create a dm channel in a guild"); + // TODO: check if guild is community server + case ChannelType.GUILD_STORE: + case ChannelType.GUILD_NEWS: + default: + throw new HTTPError("Not yet supported"); + } + + if (!channel.permission_overwrites) channel.permission_overwrites = []; + // TODO: auto generate position + + channel = { + ...channel, + ...(!opts?.keepId && { id: Snowflake.generate() }), + created_at: new Date(), + position: channel.position || 0, + }; + + await Promise.all([ + new Channel(channel).save(), + !opts?.skipEventEmit + ? emitEvent({ + event: "CHANNEL_CREATE", + data: channel, + guild_id: channel.guild_id, + } as ChannelCreateEvent) + : Promise.resolve(), + ]); + + return channel; + } + + static async createDMChannel(recipients: string[], creator_user_id: string, name?: string) { + recipients = recipients.unique().filter((x) => x !== creator_user_id); + const otherRecipientsUsers = await User.find({ where: recipients.map((x) => ({ id: x })) }); + + // TODO: check config for max number of recipients + if (otherRecipientsUsers.length !== recipients.length) { + throw new HTTPError("Recipient/s not found"); + } + + const type = recipients.length === 1 ? ChannelType.DM : ChannelType.GROUP_DM; + + let channel = null; + + const channelRecipients = [...recipients, creator_user_id]; + + const userRecipients = await Recipient.find({ + where: { user_id: creator_user_id }, + relations: ["channel", "channel.recipients"], + }); + + for (let ur of userRecipients) { + let re = ur.channel.recipients!.map((r) => r.user_id); + if (re.length === channelRecipients.length) { + if (containsAll(re, channelRecipients)) { + if (channel == null) { + channel = ur.channel; + await ur.assign({ closed: false }).save(); + } + } + } + } + + if (channel == null) { + name = trimSpecial(name); + + channel = await new Channel({ + name, + type, + owner_id: type === ChannelType.DM ? undefined : creator_user_id, + created_at: new Date(), + last_message_id: null, + recipients: channelRecipients.map( + (x) => + new Recipient({ user_id: x, closed: !(type === ChannelType.GROUP_DM || x === creator_user_id) }) + ), + }).save(); + } + + const channel_dto = await DmChannelDTO.from(channel); + + if (type === ChannelType.GROUP_DM) { + for (let recipient of channel.recipients!) { + await emitEvent({ + event: "CHANNEL_CREATE", + data: channel_dto.excludedRecipients([recipient.user_id]), + user_id: recipient.user_id, + }); + } + } else { + await emitEvent({ event: "CHANNEL_CREATE", data: channel_dto, user_id: creator_user_id }); + } + + return channel_dto.excludedRecipients([creator_user_id]); + } + + static async removeRecipientFromChannel(channel: Channel, user_id: string) { + await Recipient.delete({ channel_id: channel.id, user_id: user_id }); + channel.recipients = channel.recipients?.filter((r) => r.user_id !== user_id); + + if (channel.recipients?.length === 0) { + await Channel.deleteChannel(channel); + await emitEvent({ + event: "CHANNEL_DELETE", + data: await DmChannelDTO.from(channel, [user_id]), + user_id: user_id, + }); + return; + } + + await emitEvent({ + event: "CHANNEL_DELETE", + data: await DmChannelDTO.from(channel, [user_id]), + user_id: user_id, + }); + + //If the owner leave we make the first recipient in the list the new owner + if (channel.owner_id === user_id) { + channel.owner_id = channel.recipients!.find((r) => r.user_id !== user_id)!.user_id; //Is there a criteria to choose the new owner? + await emitEvent({ + event: "CHANNEL_UPDATE", + data: await DmChannelDTO.from(channel, [user_id]), + channel_id: channel.id, + }); + } + + await channel.save(); + + await emitEvent({ + event: "CHANNEL_RECIPIENT_REMOVE", + data: { + channel_id: channel.id, + user: await User.findOneOrFail({ where: { id: user_id }, select: PublicUserProjection }), + }, + channel_id: channel.id, + } as ChannelRecipientRemoveEvent); + } + + static async deleteChannel(channel: Channel) { + await Message.delete({ channel_id: channel.id }); //TODO we should also delete the attachments from the cdn but to do that we need to move cdn.ts in util + //TODO before deleting the channel we should check and delete other relations + await Channel.delete({ id: channel.id }); + } + + isDm() { + return this.type === ChannelType.DM || this.type === ChannelType.GROUP_DM; + } +} + +export interface ChannelPermissionOverwrite { + allow: string; + deny: string; + id: string; + type: ChannelPermissionOverwriteType; +} + +export enum ChannelPermissionOverwriteType { + role = 0, + member = 1, +} diff --git a/util/src/util/InvisibleCharacters.ts b/util/src/util/InvisibleCharacters.ts new file mode 100644 index 000000000..147f51c21 --- /dev/null +++ b/util/src/util/InvisibleCharacters.ts @@ -0,0 +1,55 @@ +export const InvisibleCharacters = [ + "\t", + " ", + "­", + "͏", + "؜", + "ᅟ", + "ᅠ", + "឴", + "឵", + "᠎", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "​", + "‌", + "‍", + "‎", + "‏", + " ", + " ", + "⁠", + "⁡", + "⁢", + "⁣", + "⁤", + "", + "", + "", + "", + "", + "", + " ", + "⠀", + "ㅤ", + "", + "ᅠ", + "𝅙", + "𝅳", + "𝅴", + "𝅵", + "𝅶", + "𝅷", + "𝅸", + "𝅹", + "𝅺" +] \ No newline at end of file diff --git a/util/src/util/index.ts b/util/src/util/index.ts index c57034685..98e1146ca 100644 --- a/util/src/util/index.ts +++ b/util/src/util/index.ts @@ -18,3 +18,4 @@ export * from "./Snowflake"; export * from "./String"; export * from "./Array"; export * from "./TraverseDirectory"; +export * from "./InvisibleCharacters"; \ No newline at end of file From 0df2a0adf6da4a86b4c14eb00c2d170191412757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erkin=20Alp=20G=C3=BCney?= Date: Thu, 13 Jan 2022 22:57:55 +0300 Subject: [PATCH 27/31] Update Channel.ts --- util/src/entities/Channel.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/util/src/entities/Channel.ts b/util/src/entities/Channel.ts index e7e0bace5..f0bbfe960 100644 --- a/util/src/entities/Channel.ts +++ b/util/src/entities/Channel.ts @@ -21,11 +21,14 @@ export enum ChannelType { GUILD_CATEGORY = 4, // an organizational category that contains up to 50 channels GUILD_NEWS = 5, // a channel that users can follow and crosspost into their own server GUILD_STORE = 6, // a channel in which game developers can sell their game on Discord - // TODO: what are channel types between 7-9? + ENCRYPTED = 7, // end-to-end encrypted channel + ENCRYPTED_THREAD = 8, // end-to-end encrypted thread channel GUILD_NEWS_THREAD = 10, // a temporary sub-channel within a GUILD_NEWS channel GUILD_PUBLIC_THREAD = 11, // a temporary sub-channel within a GUILD_TEXT channel GUILD_PRIVATE_THREAD = 12, // a temporary sub-channel within a GUILD_TEXT channel that is only viewable by those invited and those with the MANAGE_THREADS permission GUILD_STAGE_VOICE = 13, // a voice channel for hosting events with an audience + CUSTOM_START = 64, // start custom channel types from here + UNHANDLED = 255 // unhandled unowned pass-through channel type } @Entity("channels") @@ -257,7 +260,7 @@ export class Channel extends BaseClass { channel = await new Channel({ name, type, - owner_id: type === ChannelType.DM ? undefined : creator_user_id, + owner_id: type === ChannelType.DM ? undefined : null, // 1:1 DMs are ownerless in fosscord-server created_at: new Date(), last_message_id: null, recipients: channelRecipients.map( @@ -304,9 +307,9 @@ export class Channel extends BaseClass { user_id: user_id, }); - //If the owner leave we make the first recipient in the list the new owner + //If the owner leave the server user is the new owner if (channel.owner_id === user_id) { - channel.owner_id = channel.recipients!.find((r) => r.user_id !== user_id)!.user_id; //Is there a criteria to choose the new owner? + channel.owner_id = 1; // The channel is now owned by the server user await emitEvent({ event: "CHANNEL_UPDATE", data: await DmChannelDTO.from(channel, [user_id]), From 028fd7b8b3fb6a94afce0176f38da1a766f936cc Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Sat, 15 Jan 2022 18:00:54 +1100 Subject: [PATCH 28/31] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Erkin Alp Güney --- util/src/entities/Channel.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util/src/entities/Channel.ts b/util/src/entities/Channel.ts index f0bbfe960..aa1b823e9 100644 --- a/util/src/entities/Channel.ts +++ b/util/src/entities/Channel.ts @@ -161,7 +161,8 @@ export class Channel extends BaseClass { if (!opts?.skipNameChecks) { const guild = await Guild.findOneOrFail({ id: channel.guild_id }); - if (!guild.features.includes("ILLEGAL_CHANNEL_NAMES") && channel.name) { + if (!guild.features.includes("ALLOW_INVALID_CHANNEL_NAMES") && channel.name) { + for (var character of InvisibleCharacters) channel.name = channel.name.split(character).join("-"); @@ -169,7 +170,8 @@ export class Channel extends BaseClass { channel.name = channel.name.split("-").filter(Boolean).join("-"); //trim '-' character } - if (!guild.features.includes("NULL_CHANNEL_NAMES")) { + if (!guild.features.includes("ALLOW_UNNAMED_CHANNELS")) { + if (channel.name) channel.name = channel.name.trim(); if (!channel.name) throw new HTTPError("Channel name cannot be empty."); From d6f5a08cb5bda45131e2195b12307204f6e1eebb Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Sat, 15 Jan 2022 18:42:29 +1100 Subject: [PATCH 29/31] Add unhandled channel types to IsTextChannel method --- api/src/routes/channels/#channel_id/messages/index.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/api/src/routes/channels/#channel_id/messages/index.ts b/api/src/routes/channels/#channel_id/messages/index.ts index c3d3d408e..1ae9d6761 100644 --- a/api/src/routes/channels/#channel_id/messages/index.ts +++ b/api/src/routes/channels/#channel_id/messages/index.ts @@ -37,7 +37,11 @@ export function isTextChannel(type: ChannelType): boolean { case ChannelType.GUILD_PUBLIC_THREAD: case ChannelType.GUILD_PRIVATE_THREAD: case ChannelType.GUILD_TEXT: + case ChannelType.ENCRYPTED: + case ChannelType.ENCRYPTED_THREAD: return true; + default: + throw new HTTPError("unimplemented", 400); } } @@ -87,7 +91,7 @@ router.get("/", async (req: Request, res: Response) => { permissions.hasThrow("VIEW_CHANNEL"); if (!permissions.has("READ_MESSAGE_HISTORY")) return res.json([]); - var query: FindManyOptions & { where: { id?: any } } = { + var query: FindManyOptions & { where: { id?: any; }; } = { order: { id: "DESC" }, take: limit, where: { channel_id }, @@ -216,7 +220,7 @@ router.post( channel.save() ]); - postHandleMessage(message).catch((e) => {}); // no await as it shouldnt block the message send function and silently catch error + postHandleMessage(message).catch((e) => { }); // no await as it shouldnt block the message send function and silently catch error return res.json(message); } From 0a53860645dbddd4f127988ccd8da0abee7c6f2b Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Sat, 15 Jan 2022 18:44:04 +1100 Subject: [PATCH 30/31] channel.owner_id is type string not number --- util/src/entities/Channel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/src/entities/Channel.ts b/util/src/entities/Channel.ts index aa1b823e9..6750a0024 100644 --- a/util/src/entities/Channel.ts +++ b/util/src/entities/Channel.ts @@ -311,7 +311,7 @@ export class Channel extends BaseClass { //If the owner leave the server user is the new owner if (channel.owner_id === user_id) { - channel.owner_id = 1; // The channel is now owned by the server user + channel.owner_id = "1"; // The channel is now owned by the server user await emitEvent({ event: "CHANNEL_UPDATE", data: await DmChannelDTO.from(channel, [user_id]), From f8f236afb24d5c806ea0e5981e7f95de6ee4885c Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Sat, 15 Jan 2022 18:48:22 +1100 Subject: [PATCH 31/31] * Replaced list of invisible characters with unicode codepoints * No longer silently edit invalid channel names * No longer trim channel names in unnamed check --- util/src/entities/Channel.ts | 18 +++-- util/src/util/InvisibleCharacters.ts | 109 ++++++++++++++------------- 2 files changed, 65 insertions(+), 62 deletions(-) diff --git a/util/src/entities/Channel.ts b/util/src/entities/Channel.ts index 6750a0024..1cc4a5386 100644 --- a/util/src/entities/Channel.ts +++ b/util/src/entities/Channel.ts @@ -162,19 +162,21 @@ export class Channel extends BaseClass { if (!opts?.skipNameChecks) { const guild = await Guild.findOneOrFail({ id: channel.guild_id }); if (!guild.features.includes("ALLOW_INVALID_CHANNEL_NAMES") && channel.name) { - for (var character of InvisibleCharacters) - channel.name = channel.name.split(character).join("-"); + if (channel.name.includes(character)) + throw new HTTPError("Channel name cannot include invalid characters", 403); - channel.name = channel.name.split(/\-+/g).join("-"); //replace multiple occurances with just one - channel.name = channel.name.split("-").filter(Boolean).join("-"); //trim '-' character + if (channel.name.match(/\-\-+/g)) + throw new HTTPError("Channel name cannot include multiple adjacent dashes.", 403) + + if (channel.name.charAt(0) === "-" || + channel.name.charAt(channel.name.length - 1) === "-") + throw new HTTPError("Channel name cannot start/end with dash.", 403) } if (!guild.features.includes("ALLOW_UNNAMED_CHANNELS")) { - - if (channel.name) channel.name = channel.name.trim(); - - if (!channel.name) throw new HTTPError("Channel name cannot be empty."); + if (!channel.name) + throw new HTTPError("Channel name cannot be empty.", 403); } } diff --git a/util/src/util/InvisibleCharacters.ts b/util/src/util/InvisibleCharacters.ts index 147f51c21..2b014e146 100644 --- a/util/src/util/InvisibleCharacters.ts +++ b/util/src/util/InvisibleCharacters.ts @@ -1,55 +1,56 @@ +// List from https://invisible-characters.com/ export const InvisibleCharacters = [ - "\t", - " ", - "­", - "͏", - "؜", - "ᅟ", - "ᅠ", - "឴", - "឵", - "᠎", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - "​", - "‌", - "‍", - "‎", - "‏", - " ", - " ", - "⁠", - "⁡", - "⁢", - "⁣", - "⁤", - "", - "", - "", - "", - "", - "", - " ", - "⠀", - "ㅤ", - "", - "ᅠ", - "𝅙", - "𝅳", - "𝅴", - "𝅵", - "𝅶", - "𝅷", - "𝅸", - "𝅹", - "𝅺" -] \ No newline at end of file + '\u{9}', //Tab + '\u{20}', //Space + '\u{ad}', //Soft hyphen + '\u{34f}', //Combining grapheme joiner + '\u{61c}', //Arabic letter mark + '\u{115f}', //Hangul choseong filler + '\u{1160}', //Hangul jungseong filler + '\u{17b4}', //Khmer vowel inherent AQ + '\u{17b5}', //Khmer vowel inherent AA + '\u{180e}', //Mongolian vowel separator + '\u{2000}', //En quad + '\u{2001}', //Em quad + '\u{2002}', //En space + '\u{2003}', //Em space + '\u{2004}', //Three-per-em space + '\u{2005}', //Four-per-em space + '\u{2006}', //Six-per-em space + '\u{2007}', //Figure space + '\u{2008}', //Punctuation space + '\u{2009}', //Thin space + '\u{200a}', //Hair space + '\u{200b}', //Zero width space + '\u{200c}', //Zero width non-joiner + '\u{200d}', //Zero width joiner + '\u{200e}', //Left-to-right mark + '\u{200f}', //Right-to-left mark + '\u{202f}', //Narrow no-break space + '\u{205f}', //Medium mathematical space + '\u{2060}', //Word joiner + '\u{2061}', //Function application + '\u{2062}', //Invisible times + '\u{2063}', //Invisible separator + '\u{2064}', //Invisible plus + '\u{206a}', //Inhibit symmetric swapping + '\u{206b}', //Activate symmetric swapping + '\u{206c}', //Inhibit arabic form shaping + '\u{206d}', //Activate arabic form shaping + '\u{206e}', //National digit shapes + '\u{206f}', //Nominal digit shapes + '\u{3000}', //Ideographic space + '\u{2800}', //Braille pattern blank + '\u{3164}', //Hangul filler + '\u{feff}', //Zero width no-break space + '\u{ffa0}', //Haldwidth hangul filler + '\u{1d159}', //Musical symbol null notehead + '\u{1d173}', //Musical symbol begin beam + '\u{1d174}', //Musical symbol end beam + '\u{1d175}', //Musical symbol begin tie + '\u{1d176}', //Musical symbol end tie + '\u{1d177}', //Musical symbol begin slur + '\u{1d178}', //Musical symbol end slur + '\u{1d179}', //Musical symbol begin phrase + '\u{1d17a}' //Musical symbol end phrase +]; \ No newline at end of file