From bd7675581d62c79af2591e9d37eb2c7d1ca4dbb7 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Mon, 7 Feb 2022 11:13:38 +0100 Subject: [PATCH] Make custom.Message properties mutable It is convenient to, for example, change the text before resending. --- telethon/types/_custom/message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telethon/types/_custom/message.py b/telethon/types/_custom/message.py index 24eed18f..c108b6ae 100644 --- a/telethon/types/_custom/message.py +++ b/telethon/types/_custom/message.py @@ -22,7 +22,7 @@ def _fwd(field, doc): return getattr(self._message, field, None) def fset(self, value): - setattr(self._message, field, value) + object.__setattr__(self._message, field, value) return property(fget, fset, None, doc)