Fix edit handling/deduplication in channels. Fixes #74

This commit is contained in:
Tulir Asokan
2018-02-20 21:43:08 +02:00
parent 12d4025752
commit 6e1d497e66
2 changed files with 7 additions and 6 deletions
+4 -2
View File
@@ -269,8 +269,10 @@ class AbstractUser:
user = sender.tgid if sender else "admin"
if isinstance(original_update, (UpdateEditMessage, UpdateEditChannelMessage)):
self.log.debug("Handling edit %s to %s by %s", update, portal.tgid_log, user)
return portal.handle_telegram_edit(self, sender, update)
if config["bridge.edits_as_replies"]:
self.log.debug("Handling edit %s to %s by %s", update, portal.tgid_log, user)
return portal.handle_telegram_edit(self, sender, update)
return
self.log.debug("Handling message %s to %s by %s", update, portal.tgid_log, user)
return portal.handle_telegram_message(self, sender, update)