Process message again on edit

This commit is contained in:
git-bruh 2020-12-10 18:05:16 +05:30
parent cf2358dbe8
commit c666cf6039
No known key found for this signature in database
GPG key ID: E1475C50075ADCE6

View file

@ -258,7 +258,8 @@ class Callbacks(object):
try: try:
if content_dict["m.relates_to"]["rel_type"] == "m.replace": if content_dict["m.relates_to"]["rel_type"] == "m.replace":
edited_event = content_dict["m.relates_to"]["event_id"] edited_event = content_dict["m.relates_to"]["event_id"]
edited_content = content_dict["m.new_content"]["body"] edited_content = await self.process_message(
content_dict["m.new_content"]["body"])
webhook_message = message_store[edited_event] webhook_message = message_store[edited_event]
await webhook_message.edit(content=edited_content) await webhook_message.edit(content=edited_content)
return return