diff --git a/fluxer_api/src/api/channel/services/BaseChannelAuthService.ts b/fluxer_api/src/api/channel/services/BaseChannelAuthService.ts index 1770a3797..9103c8d42 100644 --- a/fluxer_api/src/api/channel/services/BaseChannelAuthService.ts +++ b/fluxer_api/src/api/channel/services/BaseChannelAuthService.ts @@ -179,8 +179,13 @@ export abstract class BaseChannelAuthService { guildData: guildDataResult!, userId, }); + const channelPermissions = await this.gatewayService.getUserPermissions({ + guildId, + userId, + channelId: channel.id, + }); const hasPermission = async (permission: bigint): Promise => { - const allowed = await this.gatewayService.checkPermission({guildId, userId, permission, channelId: channel.id}); + const allowed = (channelPermissions & permission) === permission; if (allowed) enforceGuildMfa(permission); return allowed; };