You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I faced a new spam type when the first message contained mass-mention of chat members and it was edited to ad-message immediately after that. Telegram keeps mention notifications even after message is edited, so users go to chat from notification and see ad message.
The classifier doesn't detect such messages as spam, because they contain a lot of random text (usernames) even if the original message contains spam too:
Note: Message without mentions is added to spam samples, and has 99% detection.
Screenshot of how it looks
Each mention in the message is counted as a separate entity of the type mention. I suggest a feature request to allow limiting the number of entities by type or specifically restricting mention entities.
I think it would be useful to block/limit any entity type because spam also contains telegram cashtags ($USD) and hashtags.
I'll try to implement it myself and submit the PR.
Cool. I don't think we want to reimplement LinksCheck because currently it is a part of a library that does the job on any text, not just on TG meta info. It seems to work and feels like a more universal approach to me.
I faced a new spam type when the first message contained mass-mention of chat members and it was edited to ad-message immediately after that. Telegram keeps mention notifications even after message is edited, so users go to chat from notification and see ad message.
The classifier doesn't detect such messages as spam, because they contain a lot of random text (usernames) even if the original message contains spam too:
Note: Message without mentions is added to spam samples, and has 99% detection.
Screenshot of how it looks
Each mention in the message is counted as a separate entity of the type
mention
. I suggest a feature request to allow limiting the number of entities by type or specifically restrictingmention
entities.I think it would be useful to block/limit any entity type because spam also contains telegram cashtags ($USD) and hashtags.
Message JSON from Telegram API
Check for entities also allows to update/unify
LinksCheck
function, because each URL in the message is also an entity ofurl
type.tg-spam/lib/tgspam/metachecks.go
Lines 17 to 32 in 60b5c3b
Bot API documentation: https://core.telegram.org/bots/api#messageentity
The text was updated successfully, but these errors were encountered: