RITlug / teleirc

Go implementation of a Telegram <=> IRC bridge for use with any IRC channel and Telegram group
https://docs.teleirc.com/
GNU General Public License v3.0
135 stars 46 forks source link

Spam prevention #364

Closed tinywombat765 closed 2 years ago

tinywombat765 commented 3 years ago

Summary

Help prevent spam messages from getting forwarded to IRC.

Background

Is your feature request related to a problem? Please describe: We've been getting a lot of spam messages in #rit-foss recently from the telegram end. The captcha bot deleted the spam messages on the telegram end but they still end up in IRC.

Describe the solution you'd like: A solution proposed by Repkam09 was to have teleirc not forward a user's messages until they complete the captcha.

Describe alternatives you've considered: Alternatively, teleirc could hold back messages from new users for a short time and drop them if the user leaves.

Details

I'm not familiar with the workings or teleirc so I don't know how viable these suggestions are. I imagine the second one would be easier since it wouldn't require Integration with another bot.

Outcome

Reduce spam in IRC.

Tjzabel commented 3 years ago

Hmm... This is definitely a hard issue to solve. We can try to look at message metadata on Telegram's side and see if there is a way to tell if a user has completed the captcha or not.

The second alternative seems a bit iffy to me, since a new user coming into the TG group would want assistance, and be confused as to why they are being ignored if they join in the middle of a conversation. I feel it could possibly work if we have like a 5 minute timer to when a message can be sent into the channel. So basically:

  1. check if a user has joined more than 5 mins ago
  2. If this is not the case, go in a loop and wait until the statement is true.
  3. At that point, make sure the user is still in the TG group, and then send the message to IRC.
jwflory commented 2 years ago

Looking through the issue backlog, this is a duplicate of issue #327. Closing this issue in favor of unifying the discussion there.