hackclub / hackclub/firehose

Feature request: Referral link spam protection

Open
#29 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
18
Forks
17
Avg merge
20h 57m
Merged PRs (30d)
2

Description

The idea is a feature/toggle to enable "referral link spam protection" in certain channels.

In channels with this feature/flag enabled, each message would be checked against a list of possible referral links pattern (so a list of regex(?)).

If the message matches the pattern, it would get deleted and the author would be send a information message reminding them not to share referral links inside the Slack. Ideally, the interaction would also be logged [somewhere(?)](https://github.com/hackclub/firehose/blob/main/utils/logging.ts#L16).

I'm not sure if this feature would be in the scope of Firehose or Prometheus.
---
Idea originally by @dragonsenseiguy [[here](https://hackclub.slack.com/archives/C0A9ZP1GZJ7/p1782301140832869)].

_Related to this, I think it would be a good idea if all Hack Club programs referral links, when possible, followed a common pattern (i.e. `.hackclub.com/referral/`) but I don't think that's the case right now._

Contributor guide

Open the contributing guide

Research direction

Start by reading utils/logging.ts and then locate the Firehose message-handling entry point; the issue does not identify the relevant handler or tests. Clarify whether Firehose or Prometheus owns the feature, how channel toggles and referral-link patterns are configured, and where the information message and deletion should occur. Done means matching messages are deleted, authors are informed, and interactions are logged.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.