Twentysix26 / x26-Cogs

General purpose cogs for Red V3
GNU General Public License v3.0
41 stars 30 forks source link

[Bug] channel-matches-any Condition Ignores Forums #76

Open EternalllZM opened 10 months ago

EternalllZM commented 10 months ago

Cog

Describe the bug When using the channel-matches-any condition with a forum channel ID as the value, it disregards the condition and returns false. This issue extends to threads created within a channel when the parent channel's ID is specified in a condition.

To Reproduce Steps to reproduce the behavior:

  1. Create a rule with a channel-matches-any condition targeting a forum channel.
  2. Attempt to execute actions based on conditions matching the forum channel.
  3. No actions execute, as if the channel-matches-any is false (a false negative).

Expected behavior The channel-matches-any condition should execute as the forum channel ID is specified in the condition.

Rules targeting the parent channel should apply to threads within that channel as well. This issue is exacerbated with forum channels, as there is no "main" channel to apply to, rendering this condition entirely useless.

For those who are experiencing this issue and need forum channel matching, the only workaround is to create a rule that matches the category in which the channel resides in, then use if-not: conditions to specify every other channel in the category except the forum channel.

EternalllZM commented 1 week ago

So after a bit more testing, you can actually match the thread ID of a forum post and a rule will action only on that thread in that forum channel.

So what is missing is the ability to target the parent channel in order to affect all forum posts instead of just a single one. Both behaviors should exist for more flexibility.