Support passing olm options into init()

This commit is contained in:
David Baker 2018-09-26 16:38:39 +01:00
parent 498562fa65
commit c4a3918686

View file

@ -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();