diff --git a/util/LICENSE b/util/LICENSE
deleted file mode 100644
index f19bf520..00000000
--- a/util/LICENSE
+++ /dev/null
@@ -1,14 +0,0 @@
-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 <https://www.gnu.org/licenses/>.
\ No newline at end of file
diff --git a/util/package.json b/util/package.json
index d7baed9a..7251d3e4 100644
--- a/util/package.json
+++ b/util/package.json
@@ -23,7 +23,7 @@
"discord-open-source"
],
"author": "Fosscord",
- "license": "GPLV3",
+ "license": "AGPLV3",
"bugs": {
"url": "https://github.com/fosscord/fosscord-server/issues"
},
diff --git a/util/src/entities/Channel.ts b/util/src/entities/Channel.ts
index 98766a9d..69c08be7 100644
--- a/util/src/entities/Channel.ts
+++ b/util/src/entities/Channel.ts
@@ -28,6 +28,8 @@ export enum ChannelType {
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
+ DIRECTORY = 14, // guild directory listing channel
+ GUILD_FORUM = 15, // forum composed of IM threads
TICKET_TRACKER = 33, // ticket tracker, individual ticket items shall have type 12
KANBAN = 34, // confluence like kanban board
VOICELESS_WHITEBOARD = 35, // whiteboard but without voice (whiteboard + voice is the same as stage)
diff --git a/util/src/entities/Message.ts b/util/src/entities/Message.ts
index b32bbd94..e18cf691 100644
--- a/util/src/entities/Message.ts
+++ b/util/src/entities/Message.ts
@@ -39,13 +39,15 @@ export enum MessageType {
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2 = 10,
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3 = 11,
CHANNEL_FOLLOW_ADD = 12,
+ ACTION = 13, // /me messages
GUILD_DISCOVERY_DISQUALIFIED = 14,
GUILD_DISCOVERY_REQUALIFIED = 15,
ENCRYPTED = 16,
REPLY = 19,
- APPLICATION_COMMAND = 20,
+ APPLICATION_COMMAND = 20, // application command or self command invocation
ROUTE_ADDED = 41, // custom message routing: new route affecting that channel
ROUTE_DISABLED = 42, // custom message routing: given route no longer affecting that channel
+ SELF_COMMAND_SCRIPT = 43, // self command scripts
ENCRYPTION = 50,
CUSTOM_START = 63,
UNHANDLED = 255
diff --git a/util/src/util/Constants.ts b/util/src/util/Constants.ts
index 54287af6..a5d3fcd2 100644
--- a/util/src/util/Constants.ts
+++ b/util/src/util/Constants.ts
@@ -789,3 +789,4 @@ function keyMirror(arr: string[]) {
for (const value of arr) tmp[value] = value;
return tmp;
}
+
diff --git a/util/src/util/Token.ts b/util/src/util/Token.ts
index 7c4cc61d..500ace45 100644
--- a/util/src/util/Token.ts
+++ b/util/src/util/Token.ts
@@ -6,7 +6,12 @@ export const JWTOptions: VerifyOptions = { algorithms: ["HS256"] };
export function checkToken(token: string, jwtSecret: string): Promise<any> {
return new Promise((res, rej) => {
- token = token.replace("Bot ", ""); // TODO: proper bot support
+ token = token.replace("Bot ", "");
+ /**
+ in fosscord, even with instances that have bot distinction; we won't enforce "Bot" prefix,
+ as we don't really have separate pathways for bots
+ **/
+
jwt.verify(token, jwtSecret, JWTOptions, async (err, decoded: any) => {
if (err || !decoded) return rej("Invalid Token");
|