Strip spaces around messages when hashing for deduplication. Fixes #553
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user