allow deep threads

This commit is contained in:
MathMan05
2026-02-03 21:47:02 -06:00
parent 107ae8827f
commit 84596e26de

View File

@@ -269,7 +269,7 @@ export async function getPermission(
} else if (channel_id) {
channel = channel_id;
}
if (channel?.isThread() && channel.parent_id) {
while (channel?.isThread() && channel.parent_id) {
const parent = await Channel.findOneOrFail({ where: { id: channel.parent_id }, ...query });
if (channel.type === ChannelType.GUILD_PRIVATE_THREAD) {
if (!parent.thread_members!.find(({ member }) => member.id === user_id)) {