-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error processing forwarded messages #107
Comments
I understand your point, but I'm not entirely certain about the significance of the problem. If two identical spam messages are not detected and are forwarded as spam by the admin, we won't be able to process the first one. However, in practice, I have not encountered a situation like this yet. As you may already know, hash matching is a component of the locator. It involves records added by If this scenario occurs, the issue primarily impacts an uncommon and somewhat unnecessary feature related to forwarding support for admin bans. In the past, this method was the sole means to manually ban undetected spam. However, nowadays, responding with /spam accomplishes this task more efficiently and directly. Therefore, the hash lookup doesn't concern me greatly, as the potential problem is relatively minor. Nevertheless, another more significant consequence of using the hash as a primary key is the possibility of generating incorrect results for One potential solution could involve changing the primary key to UUID, which would help prevent unintended overwrites. The |
The pair chatID/MessageID is a unique key within a chat. We can use it. And if we're not concerned about deleting the wrong spammer, then by using this pair we can delete all spam messages with the text from the forwarded message and ban all spammers who sent them |
The reason why we have a hash of the message in the first place is because for forwarded messages, I have not found any way to retrieve the MessageID of the original message. I think this is intentional in Telegram for privacy reasons. |
We will use the chatID/MessageID pair only for message uniqueness, to avoid introducing a UUID. It's already present in the table and will suit us just fine. We'll continue to search for messages to delete by hash. But now instead of one, we'll get a list and process them all (delete and ban the senders). |
…mputun#107 ) - change primary key for message table - add "deleted" field for message table to avoid retrying the processing - add migration for message table - add DeleteMessage function to mark processed and deleted messages - change Messages function to return all messages by msg fix and add unit tests
This seems to be a significant problem in the message handling system. It could lead to incorrect message attribution, unintended bans, and loss of original message context.
Version: master-68dcc02-20240805T10:42:41
paranoid mode on
How to reproduce the problem
And it is not processed
Is this functionality needed at all if it's fully implemented through reply message with a spam tag?
The text was updated successfully, but these errors were encountered: