echo_bot: reply as plain if NOT encrypted

important detail. Got lost in translation between rewrites with the
Callback/CoroutineCallback

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2022-03-12 01:21:28 +01:00
parent 89bc05b0c3
commit 31380cd726
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -134,7 +134,7 @@ class EchoBot(ClientXMPP):
if mtype not in ('chat', 'normal'):
return None
if self['xep_0384'].is_encrypted(msg): # Already handled by 'encrypted_handler'
if not self['xep_0384'].is_encrypted(msg):
if self.debug_level == LEVEL_DEBUG:
await self.plain_reply(mto, mtype, 'Echo unencrypted message:%(body)s' % msg)
return None