From a38c6ec5511893de2bb39947905c42d76a97dda5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Wed, 16 Feb 2022 13:14:06 +0100 Subject: [PATCH] Update reference body again MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- poezio_omemo/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/poezio_omemo/__init__.py b/poezio_omemo/__init__.py index 5fb331f..75b827b 100644 --- a/poezio_omemo/__init__.py +++ b/poezio_omemo/__init__.py @@ -141,7 +141,7 @@ class Plugin(E2EEPlugin): ) # Heartbeats will return a None body. if body is not None: - body = body.decode('utf-8') + message['body'] = body.decode('utf-8') except (MissingOwnKey,): # The message is missing our own key, it was not encrypted for # us, and we can't decrypt it. @@ -173,8 +173,7 @@ class Plugin(E2EEPlugin): self.display_error('An error occured while attempting decryption.\n%r' % exn) raise - if body is not None: - message['body'] = body + return None async def encrypt(self, message: Message, jids: Optional[List[JID]], _tab) -> None: if jids is None: