tgcf
tgcf copied to clipboard
Replace plugin does not change the raw_text attribute of TgcfMessage
thus a plugin such as format (which works on raw_text), if placed after replace, will negate the effect of replace.
https://github.com/aahnik/tgcf/blob/41896d19d91ff5d14f4908d878f679f642d94216/tgcf/plugins/replace.py#L26-L29
A smart way must be used to keep the text and raw_text attributes in sync thru out the plugin pipeline.
Telethon's message object is smart, and it updates the raw_text when text is updated. For TgcfMessage object, proper getters and setters need to be defined, that will take advantage of telethon's message object.