Repository navigation
Moderation: no repeat bans from stale buttons, bio in the AI check, report cap of 3 - #25
Merged
Merged
Conversation
The vote cap drops from 5 to 3: still one vote per 100 members, so groups with more than 200 members now need 3 reports instead of up to 5.
Ad accounts put the pitch in their profile bio and post a harmless line such as 看我简介. Both /spam ai and /report now read the bio with one get_chat per judged message and pass it to Jev as sender.bio; a bio that is empty, hidden, or cannot be read leaves the check as it was. The question counts a bio as spam only when it is a sales pitch, not when it introduces the sender or links to their own channel or site.
…s or announces again One person can have several ban buttons: every admin's report notice, the first-report and outcome notices, and each warning in the group. Pressing a second one banned again, and from a report notice also posted another removal notice in the group. The button now checks the member's status first. If they are already banned it only drops the button; a report notice still deletes the reported message. Two presses arriving together are handled once. Basic groups have no ban list, so someone who is no longer in the group counts as handled instead of producing a failed-removal notice. The report flow gets the same check: a message from someone an admin has already banned is deleted without a second notice and without replacing a permanent ban with a 24-hour one.
Member
Author
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Three moderation changes, one commit each.
Ban buttons on someone already banned
One person can have several ban buttons: every admin's report notice, the first-report and outcome notices to the same admin, and each warning in the group. Pressing a second one banned again, and from a report notice it also posted another removal notice in the group.
The button now reads the member's status before acting:
The report flow gets the same check. When members report another message from someone an admin has already banned and the AI confirms it, the message is deleted without a second notice. Before, this also replaced the permanent ban with a 24-hour one.
Bio in the AI check
Ad accounts put the pitch in their profile bio and post a harmless line such as 看我简介.
/spam aiand/reportnow pass the sender's bio to Jev assender.bio, read with oneget_chatper judged message. A bio that is empty, hidden, or cannot be read leaves the check as it was.The question counts a bio as spam only when it is a sales pitch (gambling, adult, 福利, easy-money work, investment returns, gray-market services). A bio that introduces the sender or links to their own channel, blog, or contact does not count.
Report cap
MAX_VOTESdrops from 5 to 3. It is still one vote per 100 members, so groups with more than 200 members need 3 reports.For the reviewer
get_chat_memberper ban press and per AI-confirmed report.Testing
uv run pytest -q --ignore=tests/integration: 1280 passed, 68 skipped.ruff check src testspasses. The MySQL integration suite was not run; none of it touches these paths.