Commit Graph

133 Commits

Author SHA1 Message Date
JC Brand
2b732cdb94 Bump filesize to latest version and fix issues. 2023-06-09 14:55:09 +02:00
JC Brand
6b365458f5 Get rid of lodash's invoke method 2023-02-26 19:32:55 +01:00
JC Brand
b69e5b5482 Create occupants based on messages
That way the occupant modal can still be shown in MUCs even if the user
is no longer online.
2023-02-20 22:02:13 +01:00
JC Brand
15c10376b0 Rename all templates to camelCase
To conform with naming conventions regarding functions, which the
templates are.
2023-02-15 14:29:07 +01:00
JC Brand
a76393f216 Also handle 'normal' messages from roster contacts 2022-12-26 19:17:40 +01:00
JC Brand
b2ad6e844c Fix chat head buttons not showing
We need to use `converse-icon` now that the fontawesome fonts aren't
included
2022-10-30 16:51:15 +01:00
JC Brand
31b10aa0b0 CSS: add right margin 2022-10-03 14:01:12 +02:00
JC Brand
aebd98cf0a Stop using font-awesome fonts to render icons
This commit just does the last 1% of work necessary to get rid of font-awesome fonts.

fixes #1004
fixes #2639
2022-09-28 15:11:46 +02:00
JC Brand
983d5ea09c CSS: more tweaks to cut off vertical zalgo text 2022-09-28 12:53:35 +02:00
JC Brand
6293efd8ee Avoid double wrapping with anchor tag and tweak unfurl CSS
to make it smaller on large screens.
2022-09-27 14:31:19 +02:00
JC Brand
fbe86e5af8 Create an ElementView base modal and use it for all modals
Modals are now all web components and are opened by component name.
2022-09-16 10:33:47 +02:00
JC Brand
927add0707 Wrap requestUpdate in an arrow function
Otherwise parameters from the event handler might be passed in to it,
causing potential weirdness.
2022-09-16 10:26:21 +02:00
JC Brand
7e2dd55c16 Use api.elements.define 2022-06-19 12:12:09 +02:00
JC Brand
a57853156e Use our own confirm dialog consistently 2022-05-12 23:23:24 +02:00
JC Brand
995cc51f99 Fix failing SMACKS test 2022-04-20 09:52:17 +02:00
SilverYoCha
b331405658 Bugfix: selected emoji inserted into all open chat boxes
when in overlay view mode.
2022-04-08 08:21:19 +02:00
JC Brand
9d4382c754 Move emoji functions to utils.js
Also, move various emoji utility methods out of @converse/headless, and
thereby remove the dependency on lit-html
2022-04-06 23:07:16 +02:00
JC Brand
32a443408a Bugfix. GIF unfurl images not loading...
and causing `TypeError: this.shouldRenderMedia is not a function`
2022-04-04 16:31:32 +02:00
JC Brand
f9a9d327d1 Use body as attribute for the message body text
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.
2022-03-14 09:28:34 +01:00
JC Brand
d2622f6fed Fixes #2557
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
2022-03-13 10:02:34 +01:00
JC Brand
e52056bb33 Refactor the emoji-picker somewhat
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
2022-03-09 12:44:33 +01:00
SilverYoCha
7409668a5d Fixes #2754 2022-03-08 16:40:26 +01:00
JC Brand
a07bd7c817 Use SVG icons for refresh button and toggle switch 2022-02-15 11:17:41 +01:00
JC Brand
f6c524f760 Move MUC modals to the muc-views plugin 2022-02-14 12:59:49 +01:00
JC Brand
7f40d1a2f2 Fix #2627 2022-02-10 13:36:22 +01:00
JC Brand
d8f6a16936 Avoid unnecessary call to requestUpdate and use updateComplete 2022-02-09 21:22:38 +01:00
JC Brand
8a9e0f6d23 CSS fix for emoji picker when there are no search results 2022-02-09 20:47:29 +01:00
JC Brand
bef2cbb462 Use SVG icons and tweak message padding 2022-01-31 23:00:26 +01:00
JC Brand
b13c674047 Show encrypted lock icon in message as svg 2022-01-29 11:31:09 +01:00
JC Brand
ac473fd297 Add dark theme Dracula
https://draculatheme.com
2022-01-28 20:28:48 +01:00
JC Brand
78846ab984 Fix: don't show avatars for followup messages 2021-11-19 23:05:16 +01:00
JC Brand
afbb46bd8c Add converse-image custom element
And use that to render images in unfurls.

This solves the issue of github URL unfurl images not having an image
extension and then being rendered as a hyperlink by `converse-rich-text`.

Instead, we know that it's supposed to be a url, so we just use `converse-image`.
2021-11-19 22:32:46 +01:00
JC Brand
664f290001 Use converse-avatar for setting avatar 2021-11-19 13:01:09 +01:00
JC Brand
f36c3fefdd Fix the MUC occupant modal and add more info
Fixes #1419
2021-11-19 11:07:09 +01:00
JC Brand
a5b73f0309 Create the converse-avatar custom element 2021-11-19 10:00:04 +01:00
JC Brand
1ee75b78b7 Replace more font icons with svg icons
Updates #1004
2021-11-14 22:53:04 +01:00
JC Brand
ecfc3e9fcf Implement support for XEP-0421 occupant ids
This let's us populate the `from_real_jid` attribute for messages in
cases where the user's nickname has changed.

Only save the occupant-id if the MUC supports it

Store all advertised features on the `chatbox.features` model.
This allows us to look up a feature without using the async
`disco.supports` API.

Updates #2241
2021-11-06 22:25:02 +01:00
JC Brand
d2a33bc210 Add the ability to retract XEP-0316 MEP messages 2021-10-20 17:49:58 +02:00
JC Brand
cf8522b1ef Fix attribute error 2021-10-04 10:56:13 +02:00
JC Brand
6cff47c6d8 Remove muc_ogp_show_unfurls setting
And instead use the `render_media` setting to determine whether unfurls
should be shown.
2021-10-01 13:22:17 +02:00
JC Brand
366932e999 Allow render_media setting to be an array of domains
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`.
2021-09-30 16:30:30 +02:00
JC Brand
be2ded3b7e No need to pass in render_media as a prop 2021-09-29 13:19:00 +02:00
JC Brand
1104b28758 Bugfix. URL is passed in, not object 2021-09-23 21:56:32 +02:00
JC Brand
881a9a6d27 Re-render message if relevant config settings change 2021-09-23 21:50:24 +02:00
JC Brand
48f37aa1c0 Call initialize in CustomElement's connectedCallback method 2021-09-23 14:25:42 +02:00
JC Brand
efafc2d691 Allow media to be invidually shown/rendered...
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
2021-09-21 17:08:30 +02:00
JC Brand
5095027a0b Don't render OOB url if it's the same as the body
Otherwise the file gets shown/rendered twice.
2021-09-01 10:35:32 +02:00
JC Brand
90ea092e4d Register a XEP-0316 MEP handler
Add caps element to the MUC join presence, so that the MUC MEP node can
know whether we're interested in receiving MEP messages.

Create info messages for any `conference-info` tags that contain `activity` tags.

Check for both `headline` and `normal` MEP messages (even though the XEP
only show `headline` examples), since `normal` messages can be archived
in MAM, but `headline` ones not.

Update the XEP-0372 reference-parsing code to take the `anchor`
attribute into consideration, specifically to check which text element
the reference applies to.

Add support for rendering XEP-0372 mentions in "info" messages and for
triggering HTML5 Desktop notifications for such mentions.

Background:
-----------

XEP-0316 describes a way for a MUC to send out PEP-like messages to MUC
participants. This feature can be used to describe custom activity happening
in the MUC.
2021-08-31 11:23:49 +02:00
JC Brand
8eac031047 Re-add wrapper anchor for unfurl images
We don't want the wrapper for interactive elements (GIF, video, audio),
but for images we still want them to link to the unfurled URL.
2021-08-10 13:45:56 +02:00
JC Brand
edd3b681c5 Create converse-message-versions component
Enables re-use outside of the message versions modal.
2021-08-10 10:48:50 +02:00