Handle body is None case when decrypting

Heartbeats don't have a payload and body will be None here.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2021-12-15 12:39:06 +01:00
parent bab012297a
commit 7243414aa0
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -139,6 +139,8 @@ class Plugin(E2EEPlugin):
# Always decrypt. Let us handle how we then warn the user.
allow_untrusted=True,
)
# Heartbeats will return a None body.
if body is not None:
body = body.decode('utf-8')
except (MissingOwnKey,):
# The message is missing our own key, it was not encrypted for