Commit Graph

36 Commits

Author SHA1 Message Date
JC Brand
1ee75b78b7 Replace more font icons with svg icons
Updates #1004
2021-11-14 22:53:04 +01:00
JC Brand
d2a33bc210 Add the ability to retract XEP-0316 MEP messages 2021-10-20 17:49:58 +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
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
JC Brand
82ade54caa Use converse-icon to show message edited icon/toggle 2021-08-09 15:53:50 +02:00
JC Brand
44a573b6c4 Handle GIFs inside Unfurls
- Add ability to play/pause by using `converse-rich-text`
- Make `converse-rich-text` component configurable whether the media URLs for GIF/audio/video are shown
- Add fallback options for GIFs that have errors
2021-08-03 12:14:13 +02:00
JC Brand
b90a435833 Move url related utility methods to @converse/headless 2021-07-05 18:35:58 +02:00
JC Brand
06460507d4 Don't let message actions drop upwards if...
it's the first (or second) message in the history, otherwise it might
appear behind the chat header.
2021-07-05 18:35:58 +02:00
JC Brand
3d8852950d Add ability to let dropdown appear at the top, left-aligned
And use that for the last message in the chat history, otherwise the
dropdown is obscured.
2021-07-01 15:23:37 +02:00
JC Brand
e00bf3da36 Make sure unread messages are cleared when showing a chat 2021-06-23 17:18:32 +02:00
JC Brand
be8a47b672 Avoid rendering borders for empty unfurl 2021-06-18 11:37:33 +02:00
JC Brand
2bbb889196 Unfurls fix 2021-06-10 13:37:11 +02:00
JC Brand
54d6a6af56 Unfurls: gracefully handle missing OGP data 2021-06-09 20:54:08 +02:00
JC Brand
f3efbba26c Create converse-message-form component
More work on making bottom panel sub-components declarative

- Handle auto-completion in the converse-muc-message-form element
- Make message limit indicator a component
- Rename template
2021-06-04 12:53:03 +02:00
Shaun Wu
9ea8653ef7 Upgrade to Webpack 3
Had to make various other changes due to incompatibilities.

- Use the new `lit` package instead of `lit-html` or `lit-element`
- Drop `haunted` since it breaks the rules by specifying `type: module`
  but then doesn't import with file extensions
- Use Sass Dart instead of node-sass (fixes #2445)
- Upgrade Karma
2021-04-30 13:50:50 +02:00
JC Brand
b2445d36d1 Bugfix. pretty_time was undefined 2021-04-23 10:59:50 +02:00
JC Brand
3558936b46 Refactor message component to require less attributes 2021-04-16 13:11:30 +02:00
JC Brand
ccd60f76c3 Cleanup
- Move top-level functinos to utils files
- Get rid of unused/obsolete overrides
- Only import components there where they're used
- Bump version in package.json
2021-03-26 10:58:51 +01:00
JC Brand
c2a6b09a25 Use converse-rich-text component to render unfurl descriptions 2021-03-24 12:41:17 +01:00
JC Brand
f897596215 Move files around to try and create some consistency and order 2021-03-24 12:41:17 +01:00
JC Brand
d3ab68011a Split core.js file into multiple smaller ones
Update storing of app settings. Store settings in a closured
`app_settings` object inside `@converse/headless/shared/settings`

Remove the `_converse.settings` object.
2021-03-09 14:11:28 +01:00
JC Brand
68d461bd42 Add the ability to show/hide unfurls 2021-03-05 18:42:14 +01:00
JC Brand
a778f3866a Show URL in unfurl card 2021-03-02 13:50:40 +01:00
JC Brand
c90b7a9691 Only render unfurl images from allowed domains
as specified by `show_images_inline` when it's set to an array of
domains.
2021-03-02 11:03:35 +01:00
JC Brand
8dd8c7d1dd Don't show unfurl card if there's nothing to show 2021-03-02 11:03:35 +01:00
JC Brand
68ca5dd279 Unfurl: JID wasn't defined 2021-03-01 22:21:45 +01:00
JC Brand
f4bcfa5c44 Move various template files into plugin folders 2021-02-22 20:37:13 +01:00
JC Brand
16edc2954d Add support for rendering unfurls via Prosody's mod_ogp
See here: https://modules.prosody.im/mod_ogp.html
2021-02-22 17:55:20 +01:00