From 1496becac7babbe6c0fa681330aa4113bc6fc6c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Wed, 27 Feb 2019 11:45:21 +0000 Subject: [PATCH] example-bot: Add note about encrypting for MUCs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- examples/echo_client.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/echo_client.py b/examples/echo_client.py index ee9fd55..af526ba 100644 --- a/examples/echo_client.py +++ b/examples/echo_client.py @@ -156,6 +156,12 @@ class EchoBot(ClientXMPP): # `encrypt_message` excepts the plaintext to be sent, a list of # bare JIDs to encrypt to, and optionally a dict of problems to # expect per bare JID. + # + # Note that this function returns an `` object, + # and not a full Message stanza. This combined with the + # `recipients` parameter that requires for a list of JIDs, + # allows you to encrypt for 1:1 as well as groupchats (MUC). + # # TODO: Document expect_problems recipients = [mto] encrypt = await self['xep_0384'].encrypt_message(body, recipients)