Feat/add spamprocessor and list command#6
Open
not-meet wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a first end-to-end spam monitoring pipeline to the Rocket.Chat app: message analysis for new users, persistence of per-user “spam level” state, and an admin-facing /spammonitor list command to view flagged users.
Changes:
- Introduces
SpamProcessor+MessageCacheto analyze messages for multiple spam “gates” (duplicates, cross-channel spread, rate flood, URL spam, etc.). - Adds persistence for user spam status (
UserStatusStore) and a handler/command layer to expose/spammonitor list. - Wires the app into the Rocket.Chat
IPostMessageSenthook and updates UI-kit/icon dependencies.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
AppsSpamMonitorApp.ts |
Initializes cache/processor, registers slash command, and hooks message processing into IPostMessageSent. |
app.json |
Declares the IPostMessageSent implementation. |
src/core/spamProcessor.ts |
Core message analysis + escalation triggers. |
src/core/cache/messageCache.ts |
In-memory per-user message history + rate tracking. |
src/persistence/userStatusStore.ts |
Persists and escalates per-user spam status records. |
src/handlers/handler.ts |
Formats and sends slash command responses (list/help/permission). |
src/commands/commandUtilities.ts |
Defines /spammonitor slash command and dispatches subcommands. |
src/definition/spamlevel.ts |
Defines spam levels, labels, escalation thresholds, and cooldown durations. |
src/definition/spamProcessor.ts |
Defines the analysis result contract. |
src/definition/messageCache.ts |
Defines the cached message shape used by the cache. |
src/enums/notifications.ts |
Adds user-facing help and notification strings. |
src/enums/commandUtilities.ts |
Adds list subcommand enum. |
package.json |
Updates Rocket.Chat UI-kit/icon dependency versions. |
package-lock.json |
Lockfile updates for dependency version bumps. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5a28f82 to
1a39d8c
Compare
Collaborator
Author
|
hey @alfredodelfabro , i've added demo of the proposed command as well as fixed all the comments mentioned by copilot. |
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.
Overview
This pr adds the main pipeline of Apps.SpamMonitor consist of message analyzing gates which checks
additionally the PR also adds a
/spammonitor listcommand which lets user to check the list of spammers with there username, the number of flags and level action which they are inFiles added
DEMO
Help notification showcasing slash commands to admins
Screencast.from.2026-05-27.00-37-57.webm
Slash command used by non admin users
Screencast.from.2026-05-27.00-39-35.webm
Case when no flagged user found
Screencast.from.2026-05-27.00-40-04.webm
showcases flagged spammer
Screencast.from.2026-05-27.00-41-23.webm
Closes #5