summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorCadence Ember <cadence@disroot.org>2025-02-24 02:25:21 +1300
committerCadence Ember <cadence@disroot.org>2025-02-24 02:25:21 +1300
commite2df174bbea6743ca033383d7c13ce8b714b3533 (patch)
tree238f350ff157943be4af5a1379b5e0bfdf5220a3 /src
parentOnly offer to link channels the bridge can access (diff)
downloadout-of-your-element-e2df174bbea6743ca033383d7c13ce8b714b3533.tar.xz
Fix #42
Don't force private badge when the base role can't view channels.
Diffstat (limited to 'src')
-rw-r--r--src/web/pug/guild.pug4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/web/pug/guild.pug b/src/web/pug/guild.pug

index 912abcf..c522d80 100644 --- a/src/web/pug/guild.pug +++ b/src/web/pug/guild.pug
@@ -11,7 +11,9 @@ mixin badge-private | Private mixin discord(channel, radio=false) - - let permissions = dUtils.getPermissions([], guild.roles, null, channel.permission_overwrites) + //- Previously, we passed guild.roles as the second parameter, but this doesn't quite match Discord's behaviour. See issue #42 for why this was changed. + //- Basically we just want to assign badges based on the channel overwrites, without considering the guild's base permissions. /shrug + - let permissions = dUtils.getPermissions([], [{id: guild_id, name: "@everyone", permissions: 1<<10 | 1<<11}], null, channel.permission_overwrites) .s-user-card.s-user-card__small if !dUtils.hasPermission(permissions, DiscordTypes.PermissionFlagsBits.ViewChannel) != icons.Icons.IconLock