Add 'OlmInboundGroupSession.first_known_index'
This commit is contained in:
parent
f6c05be8c5
commit
23a3e32b8d
3 changed files with 19 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue