This allows for more flexibility in configuring which media URLs will
automatically render and which media URLs may be manually rendered by
the user (via the message actions dropdown).
For example, suppose you want to automatically render all media URLs
from https://xmpp.org, but still allow other media (which won't render
by default) to be rendered manually by the user (by clicking the "Show
URL previews" message dropdown action).
In this case, you set `render_media` to `['xmpp.org']` and
`allowed_image_domains` to `null` or `undefined`.
Or if you want to automatically render images from xmpp.org, and
restrict the domains users might manually click to render, you can add
those extra domains to `allowed_image_domains`.
even if the global configuration is to disallow it.
* When parsing, include all media URLs, not just the ones from allowed domains.
That makes it possible to change allowed domains on-the-fly,
while still allowing media in individual messages to be shown manually
(via the message actions dropdown).
* Merge `embed_audio`, `embed_video` and `show_images_inline` into `render_media`
* Create new config settings for allowable domains for images, video and audio
* Check the URL domain against a whitelist for the message actions dropdown
to determine valid characters to form a boundary before an `@` mention
Also fixed an issue with mentions looking like they're part of URLs, by
first processing mentions separately.
Fixes#1083
Directives are rendered as templates and their bodies are MessageText instances.
We thereby achieve the necessary nesting of directives (and other rich
elements inside directives) by letting each directive
body render itself similarly to how the whole message body is rendered.
- `allow_user_trust_override`
- `clear_cache_on_logout`
The `persistent_store` setting can now also be set to `sessionStorage`
The `trusted` settings was in effect playing the role of two separate settings
and implicitly affecting a third ('persistent_store').
By breaking it up, we make things more explicit and allow for new
configurations. For example, clearing the cache on logout, while using
some kind of persistent store.
- Let `api.rooms.open` call `api.rooms.get` directly, instead of indirectly via `api.rooms.create`
- Remove the `createChatRoom` function
- Also strip URI parts from JID in `api.rooms.get` and use utility method for doing so
- Add hooks to the stanza parsers so that plugins can do additional parsing.
- Change ChatBox instance methods to functions and use them for stanza parsing.
- Move encrypt and decrypt messages to `converse.env.omemo`
Apparently, when receving a 1:1 carbon message, a device was wrongly created
for the contact's device list, instead of our own.