should_heartbeat: Ensure prekey variable is always availabe in scope

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2022-03-02 00:32:47 +01:00
parent 3681856d54
commit a7e969b078
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -593,6 +593,7 @@ class XEP_0384(BasePlugin):
OMEMO_BASE_NS, self._device_id)) OMEMO_BASE_NS, self._device_id))
# Don't error out. If it's not encrypted to us we don't need to send a # Don't error out. If it's not encrypted to us we don't need to send a
# heartbeat. # heartbeat.
prekey = False
if key is not None: if key is not None:
key = Key(key) key = Key(key)
prekey = key['prekey'] in TRUE_VALUES prekey = key['prekey'] in TRUE_VALUES