- Don't check the protocol in `checkFileTypes`, it should be doing one
thing only, and that is check whether the URL ends with a particular
file extension.
- Raise an error when a URI object can't be created from the passed in URL
Adds new function `isAllowedProtocolForMedia` which checks whether the
URL points to a file on the file system (`file:`), is in a Chrome
extension or uses HTTPs.
Use that in `shouldRenderMediaFromURL` to filter out URLs that shouldn't
be rendered.
Re-add utility methods to the `u` object so that 3rd party plugins can
use them.
It might be that it's shown in response to a failed XEP-156 lookup
because the user mistyped.
In which case the user can just correct the JID and try again, without
entering a connection URL.
Render the form based on `api.settings` instead of its own model.
When the login form is submitted, save the JID, password and connection
URL to `api.settings`.
Set the `service` on the Strophe connection object just before
connecting for the first time, otherwise a user supplied URL (via the
login form) is never used.
New API setting: show_connection_url_input
Add test case for incoming OMEMO message corrections.
The correction was being ignored because the parsed `msgid` of an
incoming correction was set to the `msgid` of the message being
replaced.
For error messages we still use the `message` attribute, since error
messages generally don't have a body, and if one does, it likely refers
to the `body` of a rejected message that the error refers to.
We're still setting both `body` and `message` attributes, but usage of
`message` for a normal `chat`, `groupchat` or `headline` stanza should
be considered deprecated.
Add the ability to send OMEMO corrections.
Refactor how OMEMO messages are sent to avoid having to override
`sendMessage` and thereby also allowing corrections of OMEMO messages to
be sent out.
Add two new hooks.
- getOutgoingMessageAttributes
- createMessageStanza
to be fetched from the server before triggering OMEMOInitialized.
For some contacts, the IQ to fetch the device list never receives a
response. IQ stanzas take 20 seconds to timeout, which means that all
OMEMO operations are blocked for 20 seconds (because everything waits
for `OMEMOInitialized`).
Create a new API method `api.omemo.devicelists.get` and use that to
fetch and `await` for any devicelist. That way we lazily wait for
devicelists to be fetched from the server and can continue with other
OMEMO operations unrelated to users who's clients don't respond to
devicelist queries.
Trigger an `emojiSelected` event instead of manually calling `insertIntoTextArea` on the `converse-message-form` a component.
This loosens the coupling between the emoji picker and `converse-message-form`.
Call `disableArrowNavigation` when the emoji-picker is disconnected from
the DOM or when escape is pressed. See #2754