mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
fix(bot): make EmbedLinks permission check work with threads
This commit is contained in:
parent
71c61e93b5
commit
97666a62df
3 changed files with 9 additions and 7 deletions
|
|
@ -100,7 +100,7 @@ public class ProxyService
|
|||
|
||||
// Check if the sender account can mention everyone/here + embed links
|
||||
// we need to "mirror" these permissions when proxying to prevent exploits
|
||||
var senderPermissions = PermissionExtensions.PermissionsFor(guild, rootChannel, message);
|
||||
var senderPermissions = PermissionExtensions.PermissionsFor(guild, rootChannel, message, isThread: rootChannel.Id != channel.Id);
|
||||
var allowEveryone = senderPermissions.HasFlag(PermissionSet.MentionEveryone);
|
||||
var allowEmbeds = senderPermissions.HasFlag(PermissionSet.EmbedLinks);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue