ShowHiddenChannels: Fix incompatibility with favorite channels experiment

This commit is contained in:
Vendicated 2024-04-07 21:46:32 +02:00
parent c311155d7c
commit e0becc1ba0
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18

View file

@ -452,7 +452,7 @@ export default definePlugin({
{
// Filter hidden channels from GuildChannelStore.getChannels unless told otherwise
match: /(?<=getChannels\(\i)(\){.+?)return (.+?)}/,
replace: (_, rest, channels) => `,shouldIncludeHidden${rest}return $self.resolveGuildChannels(${channels},shouldIncludeHidden??false);}`
replace: (_, rest, channels) => `,shouldIncludeHidden${rest}return $self.resolveGuildChannels(${channels},shouldIncludeHidden??arguments[0]==="@favorites");}`
}
]
},