Commit Graph

711 Commits

Author SHA1 Message Date
JC Brand
7028286855 Restrict editing of MUC messages...
to ones with the same XEP-0421 occupant ID
2022-08-11 22:44:11 +02:00
JC Brand
f014db8b7a Update nick attr on ChatRoom when user nick changes 2022-08-11 10:23:16 +02:00
JC Brand
45e989f048 Move converse-oauth to the community-plugins repo 2022-08-09 10:42:33 +02:00
Johan Oudinet
c245599e65 docs: enable_smacks is set to true by default since v6.0.0
Fix #2936.
2022-06-20 20:57:45 +02:00
Johan Oudinet
7e86c561c7 CHANGES.md: fix typo in 6.0.0 changes 2022-06-20 20:57:45 +02:00
JC Brand
6573d080e4 Message carbons
- Remove the `converse-carbons` plugin and make carbons part of the `converse-chat` plugin.
- Remove the `message_carbons` configuration setting. Carbons are now always enabled.
2022-05-13 10:32:54 +02:00
JC Brand
12a0d0e3cc Show roster contacts with subscription set to none
Remove the `allow_chat_pending_contacts` config option.
2022-05-13 10:19:52 +02:00
JC Brand
ab7e879261 Don't automatically convert OpenStreetMap URLs into geo: URIs in sent messages
Updates #1850 and #2914
2022-05-13 10:14:31 +02:00
JC Brand
ae2bd63d8f Release 9.1.1 2022-05-05 21:33:31 +02:00
JC Brand
3b4ef074b9
Add changelog entry for #1130
Fixes #1130
2022-04-30 13:21:55 +02:00
JC Brand
0260e5f803 Fix infinite loop in service discovery
When there is a circular dependency between disco entities (via their
advertised `disco#items`), Converse went into an infinite loop because
even though there was a check whether an entity already existed, it
failed to add newly created entities to the global
`_converse.disco_entities` collection.
2022-04-22 09:39:47 +02:00
JC Brand
e492885ac0 Set jid as the id attribute of the VCards collection
This reduces lookup time for vcards greatly, since we don't can access a
map of ids instead of using `findWhere` through an array of models.
2022-04-16 00:15:27 +02:00
SilverYoCha
7cb86638b5 Fixing display problems with chatbox view with mobile view mode 2022-04-15 06:48:25 +02:00
JC Brand
2d5b0753e2 Remove local contacts not returned from a full roster response 2022-04-14 11:29:28 +02:00
JC Brand
8e1c3e47df Improve how the muc_domain setting is populated via disco
Remove brittle code that uses `querySelector` to get the rooms list model.
This code was causing a TypeError due to a race condition.
2022-04-09 10:57:55 +02:00
JC Brand
7b31f4d333 Remove allow_muc setting 2022-04-09 09:11:54 +02:00
JC Brand
8930201b99 Fixes #2746
Update to latest Strophe which adds a fallback handler for unhandled incoming "get" and "set" IQs.
2022-04-08 22:17:01 +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
5d3895078b Use the loading HTML attr to lazily load images 2022-04-06 08:33:23 +02:00
JC Brand
2fa1d00fb4 Postrelease
- Pull first before installing node via nvm
2022-04-02 20:39:42 +02:00
JC Brand
6b1845ff39 Release 9.1.0 2022-04-02 19:31:37 +02:00
JC Brand
fca275b7c9 Refactor the login form
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
2022-03-24 23:15:30 +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
SilverYoCha
7409668a5d Fixes #2754 2022-03-08 16:40:26 +01:00
JC Brand
9328db645d Update to latest Skeletor
So that we can use the `getAll` IndexedDB method to fetch multiple
entries at once. Should result in a significant speedup.
2022-02-28 10:37:58 +01:00
JC Brand
b248803a4b Fixes #2822 2022-02-20 19:17:52 +01:00
JC Brand
beb220f188 Updates #2781
Only send presence status update when a MUC is entered, and when joining
a MUC, include the `<show>` element.
2022-02-18 10:55:20 +01:00
JC Brand
9a2424fa26 Fixes #2814. Links are mangled on open/copy 2022-02-15 14:10:40 +01:00
JC Brand
b44e1c82f0 Updates #2733
- Clear timer when a messages changes from epehemeral to non-ephemeral
- Set MUC occupant on `groupchat` message when `type` changes to `groupchat` (from `error`)
- Set roster contact on `chat` message when `type` changes to `chat` (from `error`)

Thanks @afriedmanGlacier
2022-02-15 12:23:46 +01:00
JC Brand
38519a6261 Updates #2733
Properly handle the same OMEMO message being recieved twice, with the
2nd one failing to decrypt.
2022-02-14 12:59:49 +01:00
JC Brand
7f40d1a2f2 Fix #2627 2022-02-10 13:36:22 +01:00
JC Brand
f4fdc36d31 Add modal for changing your nickname...
once you're already in a MUC.
2022-02-09 20:05:30 +01:00
afriedmanGlacier
3d8a583101
Wait for parseMessages before queuing to UI (#2803)
* parse messages before queuing

* update CHANGES

* remove unused variable

Co-authored-by: aFriedmanGlacier <afriedman@glaciersecurity.com>
2022-02-05 22:02:24 +01:00
JC Brand
337638034f Fix TypeError when trying to use @converse/headless
Fixes #2788
2022-02-03 12:39:59 +01:00
JC Brand
0f648ed1eb Don't re-initialize OMEMO on reconnection
Promises only get recreated upon logout, not reconnection.

However OMEMO was getting re-initialized on reconnection and
`_converse.omemo_store` was also deleted.

This caused a race condition where an incoming MAM message would cause
`parseEncryptedMessage` that then throws an AttributeError because
`_converse.omemo_store` is undefined because OMEMO isn't yet
initialized.

Waiting for the `OMEMOInitialized` promise doesn't help because it's
still the old (already resolved) promise from before the reconnection.
2022-02-02 23:18:45 +01:00
JC Brand
d3fa925bff Move reconnection code to Connection class
And avoid calling `tearDown` twice
2022-02-02 13:53:05 +01:00
Keith Maika
cb0b1765f3 Fix webpack configuration on Windows 2022-01-31 23:02:57 +01:00
Rob j Loranger
125f45c447
increase stanza timeout to 20s (#2799)
* increase stanza timeout to 20s

fixes issues with higher latency connections timing out fetching stanzas
2022-01-31 12:06:30 +01:00
JC Brand
4f89c4c10f Closes #1761 2022-01-28 21:22:10 +01:00
JC Brand
818ad0955a Add ability to switch between dark and light modes 2022-01-28 21:20:12 +01:00
Dele Olajide
c83cc69cef Implement new hook parseMessageForCommands for plugins to add custom commands 2022-01-27 14:34:20 +01:00
wroot
6cd05eab39 Update changelog 2022-01-10 14:54:27 +01:00
Dele Olajide
4bb4f932cf fix #2751 - Media not rendered when Converse runs in a browser extension 2021-12-16 15:44:43 +01:00
JC Brand
077162529d Release 9.0.0 2021-11-29 10:00:38 +01:00
JC Brand
3d74ed31c2 Fixes #2683, Updates #1317 2021-11-24 22:44:02 +01:00
JC Brand
1a6a7ade73 Fixes #2715 2021-11-24 21:52:40 +01:00
JC Brand
ee4e056125 Fixes #2718: Message is not displayed if it contains an invalid URL 2021-11-24 21:43:20 +01:00
JC Brand
9b1a7c70a3 Wait on OMEMOInitialized promise...
before parsing message stanza for encryption parameters.

Otherwise we might not know what our own device-id/sid is, and therefore
can't decrypt the incoming message.

Fixes #2733
2021-11-24 21:14: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
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
Andy Friedman
c76e6fb86b Compress new avatar images 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
1ee75b78b7 Replace more font icons with svg icons
Updates #1004
2021-11-14 22:53:04 +01:00
JC Brand
93e1758a0b Mention new fix in changelog 2021-10-30 21:36:18 +02: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
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
Kim Alvefur
ec792abbda Map XEP-0122 data types to HTML5 form field types
This should invoke nicer UI some browsers have for certain types, like numbers.
2021-10-26 11:57:05 +02:00
JC Brand
3cfdf4c946 Fix trimming of chats in overlayed view mode 2021-10-14 17:49:20 +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
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
9e48fdc91c Emit an event when a configuration setting gets changed 2021-09-21 17:08:30 +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
75fee76693 Fixes #2650 2021-09-14 22:27:49 +02:00
JC Brand
126fa1809e Update changelog 2021-09-13 13:45:12 +02:00
Ariel Fuggini
d44abbb48e
Adds hook to fetchLoginCredentials function (#2640)
* Adds hook to fetchLoginCredentials function

* Adds documentation
2021-09-10 16:12:46 +02:00
JC Brand
6b3f8a3f39 Release 8.0.1 2021-09-09 22:09:26 +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
f40a8f69ae Don't show minimized chats when logged out 2021-09-06 22:08:36 +02:00
JC Brand
286ab1ad83 Fixes #2633. 2021-09-06 21:56:56 +02:00
JC Brand
90cac3ecae Fixes #2326: 404 for asset /logo/conversejs-filled.svg 2021-09-06 21:29:35 +02:00
JC Brand
f04a376653 Fixes #2628: Open bookmarks toggle emits an error 2021-09-06 21:29:35 +02:00
JC Brand
8854f67c20 Bugfix: Image previews not loading when not serving Converse locally
Fixes #2634
2021-09-06 20:00:01 +02:00
JC Brand
c03bc7d600 Prepare release 8.0.0 2021-09-03 15:40:11 +02:00
JC Brand
353a90788c Make IndexedDB the default persistent store 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
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
14e5e3b3a6 Bump more deps and update changelog to mention required Node version 2021-07-15 12:47:19 +02:00
JC Brand
e675c853f3 Add XEP-0454 support for encrypting files
Fixes #1182
2021-07-01 14:35:48 +02:00
JC Brand
42b15497fc New event historyPruned 2021-06-18 10:07:30 +02:00
JC Brand
5ea9564cc3 Add new configuration setting prune_messages_above
If set to a positive integer, the chat history will be kept to that size
by removing older messages.

This happens as new messages come in (as long as the chat isn't scrolled up)
and when the user scrolls down.

Also add the `pruning_behavior` setting
2021-06-17 11:39:20 +02:00
JC Brand
dc711d494f Add a placeholder to indicate a gap in the message history
The user can click the placeholder to fill in the gap.
2021-06-17 11:35:06 +02:00
JC Brand
c8304497b5 Remove onStatusMessageChanged handler
It's no longer necessary and calls a method that doesn't exist anymore.
2021-06-15 09:59:40 +02:00
JC Brand
9fb92080f2 Get rid of the APIs to fetch chat views
This is largely a leftover from the Backbone.View days and makes less
sense now that the UI is componentized.

Ideally we don't want to call commands on the "views themselves, instead
we should be working on the the models and let the "views" update
themselves automatically.

Also, given that the `jid` attribute on the chat views might change,
especially when rendered declaratively in other frameworks like React,
a view might not be available at times where we previously might have
expected it to be (since it's been repurposed for a different JID).
2021-06-15 09:59:40 +02:00
JC Brand
c966c49304 Fixes #2500
This wrongly stored value wasn't inlcuded in the published the bundle
because the libsignal store was used, which had the right value for the public key.

Instead, this value was used locally by being passed to the libsignal
session builder to verify signed prekey.
2021-06-07 13:49:21 +02:00
JC Brand
ff233a5b1c Merge branch 'jcbrand/declarative-scrolling' 2021-06-04 12:59:52 +02:00
Christoph Scholz
8701708b53 fix /nick command not working 2021-06-03 17:29:45 +02:00
JC Brand
59d55b3526 Add option to deregister nickname when closing a MUC
By setting `auto_register_muc_nickname` to `'unregister'`
2021-06-02 22:06:57 +02:00
JC Brand
0756af2b30 Refactor chat close methods
- Remove the shared base-class method.
- Trigger `chatBoxClosed` on the model
- Send CSN from the model, not the view
2021-06-02 17:55:52 +02:00
JC Brand
f40bbbf145 Turn status plugin into folder
Remove the use of an override and add a hook `presenceConstructed` instead
2021-05-11 17:04:15 +02:00
Shaun Wu
1cb2b1f7a9 Adding configurable url history changing 2021-04-29 11:59:28 +02:00
JC Brand
24e57244d1 Remove the messageSend event 2021-04-08 10:17:02 +02:00
JC Brand
3c99f1f840 Fixes #2348
Don't automatically hide the first MUC opened in uni-view
2021-03-22 11:39:17 +01:00
Kim Alvefur
e0ccba9e24 Add Description Of A Project (DOAP) file
Project summary, including supported XEPs in a machine-readable format,
for automated listings, aggregation of XEP implementation status and
other nice things.

See https://xmpp.org/extensions/xep-0453.html

This list was simply scraped from the README and mangled into XML using
`csv2 | sed | 2xml` and amended with a few other details from e.g.
package.json and links on the website.
2021-03-15 15:02:59 +01:00
JC Brand
35ad4d31a1 Remove erroneous changelog entry 2021-03-15 15:01:49 +01:00
JC Brand
4646956922 Don't render hidden chats 2021-03-11 13:05:03 +01:00