Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Starboard] Configuring allowed role prevents starring messages from any channel #269

Open
Injabie3 opened this issue Oct 26, 2021 · 0 comments

Comments

@Injabie3
Copy link

Describe the bug
After applying the fix for #261 and #266 (via #267), it appears that it prevents any channel from starring any messages when there is an allowed role configured.

This is because when evaluating the allowlist, we call function check_channel. It checks for self.whitelist, which contains both channel IDs and role IDs, and because there is a whitelisted role, it assumes that there are whitelisted channels as well, which there aren't, and returns False. When if any(..., not allowed_channel) is evaluated, any(..., not False ) evaluates to True and we don't highlight the message.

To Reproduce
Steps to reproduce the behavior:

  1. Configure an allowed role.
  2. Configure a denied channel (should be optional)
  3. Have people with an allowed role star a message in the any non-denied channel.
  4. Notice that message isn't starred.

Expected behavior
The message to be highlighted.

Screenshots
(Similar screenshot from #261)
image

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant