e2ee-api: do not edit non-chat/groupchat messages

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2019-07-01 12:09:41 +02:00
parent 2778401b23
commit 47103fc5eb

View file

@ -166,7 +166,7 @@ class E2EEPlugin(BasePlugin):
return None
def _encrypt(self, stanza: StanzaBase) -> Optional[StanzaBase]:
if not isinstance(stanza, Message):
if not isinstance(stanza, Message) or stanza['type'] not in ('chat', 'groupchat'):
return stanza
message = stanza