Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

ContextMod not properly parsing Report Reasons #131

Open
quentinwolf opened this issue Dec 16, 2022 · 0 comments
Open

ContextMod not properly parsing Report Reasons #131

quentinwolf opened this issue Dec 16, 2022 · 0 comments

Comments

@quentinwolf
Copy link

ContextMod is not correctly parsing User Report Reasons on comments/submissions

To recreate the issue,

Create a couple basic rule in ContextModerator to leave a Comment based upon a specified report reason that begins with a specific but unique term:


    # Contact Info Strike
      - name: contactinfo strike
        kind: comment
        itemIs:
          - criteria:
            - source:
                - 'poll:modqueue'
                - 'user'
              reports: '>= 1 \Contact Info Strike.*\'
        actions:
            - kind: comment
              enable: true
              content: 'Comment removed for Contact Info Violation.'
            - kind: remove
              enable: true
        postTrigger: stop



    # Paysite Strike
      - name: paysite strike
        kind: comment
        itemIs:
          - criteria:
            - source:
                - 'poll:modqueue'
                - 'user'
              reports: '>= 1 \Paysite Strike.*\'
        actions:
            - kind: comment
              enable: true
              content: 'Comment removed for Paysite Violation.'
            - kind: remove
              enable: true
        postTrigger: stop

And then report a comment as either "Contact Info Strike ..." or "Paysite Strike ...", regardless of what you choose, ContextMod will only match the first rule in sequence for detecting any report, without actually matching the report reason.

With the above rules, anything coming in that's reported will always match the "Contact Info Strike" rule. Even if the report reason is "Paysite Strike ...". If you re-arrange the above rules so Paysite Strike is on top, then all reports will always match the "Paysite Strike" rule and never trigger the "Contact Info Strike" rule.

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

No branches or pull requests

1 participant