Commit Graph

163 Commits

Author SHA1 Message Date
JC Brand
46a5a64dda Set id on MUC join presence
This is necessary for the Bifrost Matrix-XMPP bridge
2022-01-25 13:07:03 +01:00
JC Brand
6ee3ddbc8c Make sure we're connected to MUC before sending status update 2021-12-17 20:55:57 +01:00
JC Brand
8ad097f23f Catch and log parser errors 2021-12-10 22:57:33 +01:00
JC Brand
b16d035975 Move setUserJID to init.js 2021-12-10 22:57:33 +01:00
JC Brand
3d74ed31c2 Fixes #2683, Updates #1317 2021-11-24 22:44:02 +01:00
JC Brand
e4da0f894d MUC: Make info messages ephemeral
Otherwise they pollute the history and it's not easy to dedupe them
because they can be created before the MAM history is fetched.
2021-11-24 21:28:11 +01:00
JC Brand
a06d180827 Could not find dependency "converse-controlbox" for plugin "converse-muc"
Fixes #2423
2021-11-21 12:13:13 +01:00
JC Brand
2af758e66d Not sending headers with upload request
Fixes #2728
2021-11-21 11:56:53 +01:00
JC Brand
fa562cabae Don't fetch member list if not affiliated
Fixes #1426
2021-11-21 11:05:23 +01:00
JC Brand
07b2425ff9 Don't show unnecessary errors for undecryptable OMEMO messages
As mentioned in the XEP, don't show error messages for OMEMO messages
that can't be decrypted because they were already decrypted before or
because they weren't encrypted for this device.
2021-11-20 13:43:27 +01:00
JC Brand
d48d748e30 Don't cache the most recent message.
Since messages are ordered by time, the call to get it isn't very
expensive and by not caching we avoid getting a stale cache value
2021-11-20 13:43:27 +01:00
JC Brand
33f3cb76ad Use the extended MAM message data to get the sender's real JID
That solves the problem of not being able to look up OMEMO session data
from incoming MAM messages.

See here: https://github.com/conversejs/converse.js/issues/2241#issuecomment-974626847

Updates #2241
2021-11-20 12:50:25 +01:00
JC Brand
ed63902ac1 Send presence status change to all connected MUCs
Fixes #2725
2021-11-19 21:26:35 +01:00
JC Brand
35947e3d62 Show avatars in MUC occupants sidebar
Fixes #1322

(Also clean up some loose threads)
2021-11-19 21:08:51 +01:00
JC Brand
bdac6f1b47 Split vcard plugin up into multiple files 2021-11-19 13:42:59 +01:00
JC Brand
664f290001 Use converse-avatar for setting avatar 2021-11-19 13:01:09 +01:00
JC Brand
8db12e61bf Use converse-avatar and fix bug...
where avatar didn't show in 1:1 chat heading (due to a race condition)
2021-11-19 11:07:09 +01:00
JC Brand
e347621dc8 Add JSDoc example 2021-11-17 09:42:38 +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
a60127e66f Avoid possible exception when leaving/reconnecting in a MUC
- Unregister nickname before sending unavailable presence
- Send unavailable presence before destroying state
- Call `leave` after unregistering, otherwise the disco entry for the MUC gets removed in `leave` while it's still necessary to unregister
- Wrap `this.leave` in  try/except in `onConnectionStatusChanged` handler
- Add new MUC connection status, `CLOSING` to avoid `this.leave()` being called when `hidden` gets set to `true` while the MUC is in the process of being closed.
2021-11-04 19:21:29 +01:00
JC Brand
2fb8ea3ea0 Only register new nick if auto_register_muc_nickname is set 2021-10-30 21:30:53 +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
6177afd5b1 MUC: Don't send markers for non-groupchat messages.
I noticed that a marker was sent for an error message (created due to an
unencryptable OMEMO messages), and this caused the user to be kicked
from the MUC.
2021-10-30 20:56:23 +02:00
JC Brand
d2a33bc210 Add the ability to retract XEP-0316 MEP messages 2021-10-20 17:49:58 +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
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
1809e38911 Move isUniView function to utils 2021-09-29 12:03:21 +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
ayu
ae6dbeb287 Update vcard.js
Example code wouldn't work anymore.
2021-09-18 21:59:17 +02:00
JC Brand
2b7624e622 Make sure all files are used when generating API docs 2021-09-14 15:04:12 +02:00
JC Brand
ad501d4309 Avoid AttributeError when _converse.disco_entities is undefined 2021-09-13 14:23:46 +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
8aa16ea0be Fix broken import 2021-09-08 10:52:37 +02:00
JC Brand
8d01d7a710 Use optional chaining and update changelog 2021-09-08 10:35:46 +02:00
The Stranjer
660d765c59
Ensure that the converse session is actually present (#2636)
* Ensure that the converse session is actually present before trying to get anything out of it

* Update changelog
2021-09-08 10:32:59 +02:00
JC Brand
8f34065fc0 Also create MEP messages received from a MAM archive 2021-09-08 10:22:26 +02:00
JC Brand
286ab1ad83 Fixes #2633. 2021-09-06 21:56:56 +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
7e88ffd098 Move MUC functions to utils 2021-08-31 11:23:49 +02:00
JC Brand
95fbd55a19 Fixes #2583 2021-07-30 09:58:35 +02:00
JC Brand
d0627f800c Clear unread message counters when chat becomes visible 2021-07-30 09:56:17 +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
60826ac6c6 Move functions out of core.js 2021-07-19 16:40:40 +02:00
JC Brand
8931c61876 Prevent attribute error on timeout 2021-07-19 16:40:40 +02:00
JC Brand
d1abf3a04e Wait for roster to be initialized 2021-07-19 16:40:40 +02:00
JC Brand
f2aa39e1c3 Identify media URLs during message parsing 2021-07-06 13:35:22 +02:00
JC Brand
01efb02f9e Make sure XEP-0363 urls are also OMEMO encrypted
by re-using `ChatBox.prototype.sendMessage`.

updates #1182
2021-07-03 00:22:03 +02:00
JC Brand
e675c853f3 Add XEP-0454 support for encrypting files
Fixes #1182
2021-07-01 14:35:48 +02:00