- Add a `Stanza` class which can be used by Strophe because it has a
`tree()` function. This is what gets returned by the `stx` tagged
template.
- Throw an error when no valid namespace is on the stanza.
Strophe.Builder used to automatically add the `jabber:client` namespace,
but that doesn't happen with `toStanza`, so we need to fail if it's not
specified by the user.
- Use the Strophe XML Parser
This opens the door to NodeJS support
We now no longer have an `.items` collection on a disco entity.
Instead, add a new API method `api.disco.entities.items` should be used.
This should solve the issue of the entities disappearing when reloading
the page.
Updates #2925
When calling `api.supports(feature, entity_jid)`, it checks whether the entity
supports the feature or whether any of the sub-items on the entity
supports that feature.
However, on `DiscoEntity`, the `waitUntilFeaturesDiscovered` promise
didn't wait for the items on the entity to be fetched, and was therefore
resolved too quickly.
This caused the file upload button to not render.
Updates #2925
since they can see real JIDs, even if the room is semi-anonymous.
Also made changes regarding programming style and conventions:
- Pass in `this` to the template
Recently I've started simplifying the `render` method by just
passing `this` into the template and letting the template calculate
what it needs from that.
- Don't use `bind()`
It's slow and arrow functions can be used instead.
- Don't use an i18n string inside a tagged template literal
Due to limitations with `xgettext` which cannot parse properly
inside tagged template literals
- Use snake-case for variables
Importing a plugin's `index.js` file from other plugins means that it's no
longer possible to remove that plugin by removing it from `src/converse.js`.
Instead, all plugins need to be imported in proper order from
`src/headless/headless.js` and `src/converse.js`.
Updates #3026
this commit introduces autocomplete feature to the muc-list group chat dialog,
previously there was only an input field which displayed hardcoded servers.