Commit Graph

276 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
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
John Spurlock
1c6ada4af8 Fix send button not working in a muc room
Was looking at the wrong form
2021-10-30 21:16:11 +02:00
JC Brand
ca02bdcb61 Bugfix. Use real JID when setting up a device session in a MUC
Thanks to @orbitz, see: https://github.com/conversejs/converse.js/issues/1481#issuecomment-509183431

Updates #1481
2021-10-30 21:14:11 +02:00
JC Brand
90d93b364a Reregister nick when changing it in a members-only MUC 2021-10-30 20:56:23 +02:00
JC Brand
1b31e80f25 Render MEP message reason as rich text 2021-10-21 10:43:24 +02:00
JC Brand
d2a33bc210 Add the ability to retract XEP-0316 MEP messages 2021-10-20 17:49:58 +02:00
JC Brand
3cfdf4c946 Fix trimming of chats in overlayed view mode 2021-10-14 17:49:20 +02:00
JC Brand
5a7f16b6f9 Bugfix. 'closed' value only relevant in overlayed view mode 2021-10-14 16:15:17 +02:00
JC Brand
32e521fdc7 Bugfix. MEP messages appear at bottom when returned from MAM 2021-10-13 21:14:57 +02:00
JC Brand
521f3d88d2 Move MUC MAM tests into a new file 2021-10-13 20:01:09 +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
1809e38911 Move isUniView function to utils 2021-09-29 12:03:21 +02:00
JC Brand
06ec539839 Update lit imports 2021-09-29 11:20:14 +02:00
JC Brand
84c6a0039c Fix embedded, singleton mode.
It's now necessary to add a `converse-root` element in the DOM where you
want Converse to render (previously it was any element with the id
`#conversejs`).

Also, turned `converse-chats` element into a Lit element and re-render
`converse-root` and `converse-chats` when the `view-mode` or `singleton`
settings change. This is a step towards being able to change the view
mode on the fly and have the entire chat re-render appropriately.

Fixes #2647
2021-09-24 11:53:49 +02:00
JC Brand
5ff57258ec Fix nickname form width 2021-09-23 22:31:30 +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
7f2ab05f97 Move tests to separate file 2021-09-22 16:45:57 +02:00
JC Brand
05dcb4e8d7 Breaking change: stop setting config variables on the _converse object 2021-09-21 17:08:30 +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
ed490fc202 Create directory for modal plugin 2021-09-20 11:13:26 +02:00
JC Brand
75fee76693 Fixes #2650 2021-09-14 22:27:49 +02:00
JC Brand
caffcaaef2 Move occupant-related tests into new file 2021-09-14 22:03:10 +02:00
JC Brand
906a606010 Get rid of unnecessary specificity and functions 2021-09-09 11:35:00 +02:00
JC Brand
ef2c206507 Fix failing test 2021-09-09 11:12:31 +02:00
JC Brand
b78c19f6f2 Fix showing of HTML5 notifications for MEP messages 2021-09-08 17:30:30 +02:00
JC Brand
8f34065fc0 Also create MEP messages received from a MAM archive 2021-09-08 10:22:26 +02:00
JC Brand
f40a8f69ae Don't show minimized chats when logged out 2021-09-06 22:08:36 +02:00
JC Brand
f04a376653 Fixes #2628: Open bookmarks toggle emits an error 2021-09-06 21:29:35 +02:00
JC Brand
b75e67fafa Fixes #2629 OMEMO button tooltip is wrong in private chat 2021-09-06 20:59:26 +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
5dc89fb2b3 Ignore 'minimized' flag when not in overlayed view mode 2021-08-31 12:11:27 +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
6827e21df1 Fix race conditions in tests 2021-08-31 11:23:49 +02:00
JC Brand
0c0af2d00b Fix the minimized chats toggle
Clicking didn't make the minimized chats appear.
Also turn it into a Lit component
2021-08-29 00:15:45 +02:00
JC Brand
6c3a3dd1d3 Fix background for overlayed mode 2021-08-29 00:15:45 +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
610e334bed Use converse-icon in the modtools modal 2021-08-06 13:38:12 +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
d0627f800c Clear unread message counters when chat becomes visible 2021-07-30 09:56:17 +02:00
JC Brand
106cde9262 Update modtools component...
to accept jid and affiliation and to not use a Model to store state
2021-07-28 13:28:01 +02:00
JC Brand
0242fdb020 Extract moderator tools functionality and put it in a component
This makes it easier for 3rd parties to embed it in other modals (besides the bootstrap modal).
2021-07-27 12:53:39 +02:00
JC Brand
10c610232c Use converse-icon instead of webfonts in heading dropdown 2021-07-27 11:11:36 +02:00
JC Brand
c961615609 Move converse-dropdown styles in separate file
And add some tweaks
2021-07-27 10:53:23 +02:00
JC Brand
55146820e3 Use converse-icon in the converse-dropdown component
Instead of using webfonts
2021-07-26 19:27:59 +02:00
JC Brand
0ccf25d986 Add support for controlling (e.g. pausing, looping) gifs
- Create new component `converse-gif`
- Draw gif in canvas and add controlls
2021-07-23 19:31:43 +02:00
JC Brand
316748988b Allow contact's profile modal to be shown...
even if there is now OMEMO device info
2021-07-23 18:30:07 +02:00
JC Brand
5cce34eb40 Split push plugin up into multiple files 2021-07-19 16:40:40 +02:00