diff --git a/poezio_omemo/__init__.py b/poezio_omemo/__init__.py index 4eba924..4c828c2 100644 --- a/poezio_omemo/__init__.py +++ b/poezio_omemo/__init__.py @@ -139,7 +139,9 @@ class Plugin(E2EEPlugin): # Always decrypt. Let us handle how we then warn the user. allow_untrusted=True, ) - body = body.decode('utf-8') + # 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 # us, and we can't decrypt it.