From c4a39186862b61915cab1e98e6eed417878020cd Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 26 Sep 2018 16:38:39 +0100 Subject: [PATCH] Support passing olm options into init() --- javascript/olm_suffix.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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();