Skip to content

Commit 34592ac

Browse files
Fix category not detected on thread channels and alike
1 parent 439053b commit 34592ac

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

  • src/main/java/de/chojo/repbot/dao/access/guild/settings/sub/thanking

src/main/java/de/chojo/repbot/dao/access/guild/settings/sub/thanking/Channels.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ public boolean isEnabled(GuildMessageChannel channel) {
5555
return true;
5656
}
5757
}
58+
59+
if (channel instanceof ThreadChannel bc
60+
&& bc.getParentChannel() instanceof ICategorizableChannel categorizableChannel) {
61+
if (isEnabledByCategory(categorizableChannel.getParentCategory())) {
62+
return true;
63+
}
64+
}
65+
5866
return isEnabledByChannel(baseChannel);
5967
}
6068

0 commit comments

Comments
 (0)