TrustyJAID/Trusty-cogs

[Starboard] Adding allowlist prevents starring message

Closed this issue · 0 comments

Describe the bug
Seems like the allowlist and blocklist for roles and channels were combined. This works fine for blocklist, but for allowlist, if we add an allowed role, check_channels will see it in self.whitelist, and the check fails because any channel that it checks will not match because the channel ID will not match the role ID. As such, it will not post to the starboard channel. This is the same vice-versa (e.g. adding an allowed channel and attempting to star a message).

To Reproduce
Steps to reproduce the behavior:

  1. Add an allowed/channel role to an existing staboard.
  2. Attempt to star a new message (assuming threshold 1), either with emoji or manually with [p]star.
  3. Notice that it doesn't get starred.

Expected behavior
The new message was supposed to get starred.

Additional context
Noticed this when upgrading from 2.4.4 to 2.5.2.