example-bot: Add note about encrypting for MUCs
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
c753a672f4
commit
1496becac7
1 changed files with 6 additions and 0 deletions
|
@ -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 `<encrypted/>` 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)
|
||||
|
|
Loading…
Reference in a new issue