diff options
author | Richard van der Hoff <richard@matrix.org> | 2016-09-04 23:34:24 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2016-09-04 23:41:10 +0100 |
commit | 2e9021c2e73786e9045c0634c43efa86f18ac8de (patch) | |
tree | c6296948704c35edad11eb0474aaf51c7d15698a /javascript | |
parent | 0c3f527dfd46d3056d5b3690836c102f0e0adfb4 (diff) |
OlmSession.has_received_message
I find myself wanting to know if an OlmSession is in the pre-key state or not,
to help debugging at the application level.
Diffstat (limited to 'javascript')
-rw-r--r-- | javascript/olm_post.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/javascript/olm_post.js b/javascript/olm_post.js index 955d68d..6c99030 100644 --- a/javascript/olm_post.js +++ b/javascript/olm_post.js @@ -263,6 +263,13 @@ Session.prototype['session_id'] = restore_stack(function() { return Pointer_stringify(id_buffer); }); +Session.prototype['has_received_message'] = function() { + return session_method(Module['_olm_session_has_received_message'])( + this.ptr + ) ? true : false; +}; + + Session.prototype['matches_inbound'] = restore_stack(function( one_time_key_message ) { |