I have hundreds of contacts blocked because many spammers join random groups and the first thing they do is spam all members via direct message. It's almost always about publicizing some cryptocurrency scam, mining robots, or men harassing women.
Some Telegram clients offer the ability to automatically mute and archive chats initiated by users who are not in my contacts. It's a function that has its uses in that it keeps spammers hidden in archive.
But this is just a patch and doesn't really deal with the spam problem. If the unwanted messages had not been sent first, there would be nothing to report.
The best remedy is prevention, acting preventively by allowing users to take action to avoid spam. Add among the privacy settings the ability to choose who can contact me:
Who can contact me:
This would be a solution that can deal with the spam problem BEFORE the spam happens, to avoid spam.