Strip spaces around messages when hashing for deduplication. Fixes #553

This commit is contained in:
Tulir Asokan
2020-12-19 12:49:43 +02:00
parent 6f4faf7a58
commit 3fe26ae4dd
+1 -1
View File
@@ -61,7 +61,7 @@ class PortalDedup:
if isinstance(event, MessageService):
hash_content = [event.date.timestamp(), event.from_id, event.action]
else:
hash_content = [event.date.timestamp(), event.message]
hash_content = [event.date.timestamp(), event.message.strip()]
if event.fwd_from:
hash_content += [event.fwd_from.from_id, event.fwd_from.channel_id]
elif isinstance(event, Message) and event.media: