mirror of
https://github.com/spacebarchat/server.git
synced 2026-03-30 18:15:41 +00:00
allow deep threads
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user