From 31380cd7262007fd517190fff06f6f9f9501f0e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sat, 12 Mar 2022 01:21:28 +0100 Subject: [PATCH] echo_bot: reply as plain if NOT encrypted MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit important detail. Got lost in translation between rewrites with the Callback/CoroutineCallback Signed-off-by: Maxime “pep” Buquet --- examples/echo_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/echo_client.py b/examples/echo_client.py index 839a7c2..a222e9b 100644 --- a/examples/echo_client.py +++ b/examples/echo_client.py @@ -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