Add repeat action & tweak untrigger filter #1411
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Modifies the 1.5 proto default behavior for
untrigger-filter
back to never whenever the action is filtered. This is because we've realized that otherwise recursive actions will cause infinite recursion on untrigger by default, which is undesired behavior.So now in proto 1.5, when an action has no filter, it defaults to untrigger-filter="always", but whenever it's filtered or map is in an older proto, it defaults to never.
Additionally a
repeat
action has been introduced. This allows for loops without recursion within actions:When
var
is 5, this will send the message 10 times in chat. Note thattimes
takes in a function, so you can do things as simple astimes="5"
or as complex as to mix-in variables, and math operations. Non-whole numbers will be rounded down, negative numbers will cause no iterations (it won't run the inner action).The
filter
will be run as many times as the loop is ran, for performance reasons if you want the filter to be checked just once move it outside therepeat
like action filter="x" -> repeat.Untriggering has no effect whatsoever over the repeat action, it will not propagate any untrigger signal downwards