Can't set options.storage
See original GitHub issueI’m working on an integration of JSXC (v4.1.1) with Openfire (4.6.0-beta). Part of the integration allows an administrative user to make and persist changes to the JSXC configuration options. To be able to allow for such dynamics, the options to be used are exposed through a web endpoint (such as https://xmpp.igniterealtime.org:7483/jsxc/options.json ).
The web page that loads the web application itself firsts loads that endpoint, and uses its content to initialize JSXC. Look at the source of https://xmpp.igniterealtime.org:7483/jsxc/ to see that in action.
I’ve been pretty successful in applying changes to the options to be used this way. I can pretty much add all options as documented on https://jsxc.readthedocs.io/en/latest/api.html
All, but one, that is. Whenever I try to set options.storage
the development console of the browser logs these errors whenever I reload the page:
jsxc.bundle.js:2 Uncaught TypeError: t.backend.setItem is not a function
at t.testStorage (jsxc.bundle.js:2)
at new t (jsxc.bundle.js:2)
at Function.t.getStorage (jsxc.bundle.js:2)
at Function.t.getOptions (jsxc.bundle.js:2)
at Function.t.getOption (jsxc.bundle.js:2)
at Function.e.initialize (jsxc.bundle.js:2)
at Function.t.init (jsxc.bundle.js:2)
at new t (jsxc.bundle.js:2)
at Object.success ((index):70)
at c (jquery-3.5.1.min.js:2)
and
jsxc.bundle.js:2 Uncaught TypeError: t.backend.removeItem is not a function
at o (jsxc.bundle.js:2)
at jsxc.bundle.js:2
My experience with front-end development is limited, so I’m uncertain if this actually is an issue within JSXC. It might be me, messing up somewhere. That said, all other options that I add in a similar fashion do seem to work…
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
It was a mistake on my end. Sorry, but nice to hear that you get it working. 🎉
That’s great. Thanks for your effort. If you like you can also put it to the community plugin on the installation page of our website. Just create a pr in https://github.com/jsxc/jsxc.org