translate icon indicating copy to clipboard operation
translate copied to clipboard

Reply based translate command broken in encrypted room

Open jaywink opened this issue 3 years ago • 0 comments

A normal !tr fi Hello this is English for example works fine in an encrypted room. But replying to for example Hello this is English with !tr fi fails with the following:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/mautrix/client/syncer.py", line 200, in _catch_errors
    await handler(data)
  File "/opt/maubot/maubot/handlers/command.py", line 119, in __call__
    return await self.__mb_func__(self.__bound_instance__, evt, **call_args)
  File "/data/plugins/xyz.maubot.translate-v0.1.0.mbp/translate/bot.py", line 105, in command_handler
    text = reply_evt.content.body
AttributeError: 'EncryptedMegolmEventContent' object has no attribute 'body'

In a non-encrypted room this works fine.

jaywink avatar Feb 25 '21 23:02 jaywink