aboutsummaryrefslogtreecommitdiff
path: root/javascript/olm_post.js
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-07-17 18:43:41 +0100
committerMark Haines <mark.haines@matrix.org>2015-07-17 18:43:41 +0100
commit970fc60f8bea21ea91baaaed2555a11df41a947d (patch)
tree22976f46bacd49ac0ba543bdf8bd00b581df27a9 /javascript/olm_post.js
parent3468886e27c54690cc484662ea656f021997a9c7 (diff)
Add remove_one_time_keys to the javascript bindings
Diffstat (limited to 'javascript/olm_post.js')
-rw-r--r--javascript/olm_post.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/javascript/olm_post.js b/javascript/olm_post.js
index 94d3e82..af1cdb8 100644
--- a/javascript/olm_post.js
+++ b/javascript/olm_post.js
@@ -105,7 +105,7 @@ Account.prototype['mark_keys_as_published'] = restore_stack(function() {
});
Account.prototype['max_number_of_one_time_keys'] = restore_stack(function() {
- account_method(Module['_olm_account_max_number_of_one_time_keys'])(
+ return account_method(Module['_olm_account_max_number_of_one_time_keys'])(
this.ptr
);
});
@@ -122,6 +122,12 @@ Account.prototype['generate_one_time_keys'] = restore_stack(function(
);
});
+Account.prototype['remove_one_time_keys'] = restore_stack(function(session) {
+ account_method(Module['_olm_remove_one_time_keys'])(
+ this.ptr, session.ptr
+ );
+});
+
Account.prototype['pickle'] = restore_stack(function(key) {
var key_array = array_from_string(key);
var pickle_length = account_method(