diff options
author | David Baker <dave@matrix.org> | 2018-09-26 16:38:39 +0100 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2018-09-26 16:38:39 +0100 |
commit | c4a39186862b61915cab1e98e6eed417878020cd (patch) | |
tree | f71609e8c19925c595ddedb13509178a34fe3e3c /javascript | |
parent | 498562fa65c7ba790b3cdaf0e8e4568765bdfc8f (diff) |
Support passing olm options into init()
Diffstat (limited to 'javascript')
-rw-r--r-- | javascript/olm_suffix.js | 5 |
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(); |