diff --git "a/api/src/routes/channels/\043channel_id/messages/index.ts" "b/api/src/routes/channels/\043channel_id/messages/index.ts" index c3d3d40..1ae9d67 100644 --- "a/api/src/routes/channels/\043channel_id/messages/index.ts" +++ "b/api/src/routes/channels/\043channel_id/messages/index.ts" @@ -37,7 +37,11 @@ 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 @@ 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 @@ 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); }