python: Use the unpublished fallback key lenght when outputing fallback keys

This commit is contained in:
Damir Jelić 2021-11-22 10:03:05 +01:00
parent 8c62046392
commit 85a2f47088

View file

@ -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)