From 85a2f4708831ce8039826573244f0ff476641211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Mon, 22 Nov 2021 10:03:05 +0100 Subject: [PATCH] python: Use the unpublished fallback key lenght when outputing fallback keys --- python/olm/account.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/olm/account.py b/python/olm/account.py index eab29d0..27ccbb3 100644 --- a/python/olm/account.py +++ b/python/olm/account.py @@ -304,12 +304,12 @@ class Account(object): to the client being offline and not replenishing the pool of one-time keys. """ - out_length = lib.olm_account_fallback_key_length(self._account) + out_length = lib.olm_account_unpublished_fallback_key_length(self._account) out_buffer = ffi.new("char[]", out_length) ret = lib.olm_account_unpublished_fallback_key(self._account, out_buffer, out_length) self._check_error(ret) - fallback_key = ffi.unpack(out_buffer, ret) + fallback_key = ffi.unpack(out_buffer, out_length) return json.loads(fallback_key)