Skip to content

Commit

Permalink
Handle canTalk for private threads in interactions (#2603)
Browse files Browse the repository at this point in the history
  • Loading branch information
MinnDevelopment authored Jan 13, 2024
1 parent 6ce4a23 commit a9c55b3
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ public boolean isLocked()
public boolean canTalk(@Nonnull Member member)
{
Checks.notNull(member, "Member");
if (type == ChannelType.GUILD_PRIVATE_THREAD && threadMembers.get(member.getIdLong()) == null)
return member.hasPermission(getParentChannel(), Permission.MANAGE_THREADS, Permission.MESSAGE_SEND_IN_THREADS);
return member.hasPermission(getParentChannel(), Permission.VIEW_CHANNEL, Permission.MESSAGE_SEND_IN_THREADS);
}

Expand Down

0 comments on commit a9c55b3

Please sign in to comment.