Commit 23a3e32b authored by Richard van der Hoff's avatar Richard van der Hoff
Browse files

Add 'OlmInboundGroupSession.first_known_index'

parent f6c05be8
......@@ -165,6 +165,13 @@ size_t olm_inbound_group_session_id(
uint8_t * id, size_t id_length
);
/**
* Get the first message index we know how to decrypt.
*/
uint32_t olm_inbound_group_session_first_known_index(
const OlmInboundGroupSession *session
);
#ifdef __cplusplus
} // extern "C"
......
......@@ -105,4 +105,10 @@ InboundGroupSession.prototype['session_id'] = restore_stack(function() {
return Pointer_stringify(session_id);
});
InboundGroupSession.prototype['first_known_index'] = restore_stack(function() {
return inbound_group_session_method(
Module['_olm_inbound_group_session_first_known_index']
)(this.ptr);
});
olm_exports['InboundGroupSession'] = InboundGroupSession;
......@@ -391,3 +391,9 @@ size_t olm_inbound_group_session_id(
session->signing_key.public_key, GROUP_SESSION_ID_LENGTH, id
);
}
uint32_t olm_inbound_group_session_first_known_index(
const OlmInboundGroupSession *session
) {
return session->initial_ratchet.counter;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment