Skip to content

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

@Injabie3

Description

@Injabie3

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions