aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2018-09-26 16:38:39 +0100
committerDavid Baker <dave@matrix.org>2018-09-26 16:38:39 +0100
commitc4a39186862b61915cab1e98e6eed417878020cd (patch)
treef71609e8c19925c595ddedb13509178a34fe3e3c
parent498562fa65c7ba790b3cdaf0e8e4568765bdfc8f (diff)
Support passing olm options into init()
-rw-r--r--javascript/olm_suffix.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/javascript/olm_suffix.js b/javascript/olm_suffix.js
index ec0e39b..7f19953 100644
--- a/javascript/olm_suffix.js
+++ b/javascript/olm_suffix.js
@@ -1,7 +1,10 @@
var olmInitPromise;
-olm_exports['init'] = function() {
+olm_exports['init'] = function(opts) {
if (olmInitPromise) return olmInitPromise;
+
+ if (opts) OLM_OPTIONS = opts;
+
olmInitPromise = new Promise(function(resolve, reject) {
onInitSuccess = function() {
resolve();