Commit Graph

699 Commits

Author SHA1 Message Date
JC Brand
5a57ded243 Add support for the XEP-0333 displayed chat marker
Credit for this work goes to @deleolajide
2020-06-01 18:01:02 +02:00
JC Brand
3cca2fdb7f roster: Filter contacts via all available information 2020-05-14 12:20:23 +02:00
Dele Olajide
cae5e9c875 Updates #1999 - Demarcate first unread message 2020-05-13 13:39:33 +02:00
JC Brand
d49b630bdc Enable sending of MUC presence probes 2020-05-06 18:01:59 +02:00
Christoph Scholz
a7deb2021a make use_system_emojis==false work 2020-04-29 11:25:08 +02:00
Christoph Scholz
f78a1372e3 fix rendering of muc_roomid_policy_hint 2020-04-28 10:52:49 +02:00
JC Brand
2696c26ffb Add new config setting allow_adhoc_commands 2020-04-17 15:01:12 +02:00
JC Brand
78b60a3bd9 Fixes #515 Add support for XEP-0050 Ad-Hoc commands 2020-04-17 11:01:44 +02:00
Dele Olajide
f97d827280
fix #1963 - Mentions are visually incorrect when used in message replies (#1968)
* fix #1963 - Mentions are visually incorrect when used in message replies
2020-04-15 12:25:53 +02:00
JC Brand
16c58a966a modal: Add ability to show multiple input fields for confirm modal 2020-04-15 09:29:52 +02:00
JC Brand
78b1a5c42a Show send button by default 2020-04-14 14:49:09 +02:00
JC Brand
8b496d085e Enable XEP-0156 support by default 2020-04-10 15:25:49 +02:00
JC Brand
531ebf335c Properly test and fix show/hide of MUC topic 2020-04-06 15:27:32 +02:00
Dele Olajide
10da630d8a
fix #1937 - Editing a message removes the mentions highlight (#1938)
* Fixes #1937 Editing a message removes the mentions highlight
2020-04-02 11:45:04 +02:00
JC Brand
bb9e394e93 muc: handle join/leave notifications similarly to CSNs
Remove the `muc_show_join_leave_status` config setting.
We don't show the optional statuses at all now.
2020-04-01 14:34:11 +02:00
JC Brand
631b9bb438 Use the settings API for setting and getting config settings
This is an initial step towards no longer storing and accessing settings
directly via the `_converse` object
2020-03-31 11:57:03 +02:00
JC Brand
095a1bc56b Fixes #1490. Don't reconnect if were weren't auth'd to begin with. 2020-03-30 05:29:21 +02:00
Lance Stout
a6aaf3f595 Update chat state notifications when message is edited. 2020-03-03 15:24:15 +01:00
JC Brand
4b62678e2f Update changelog 2020-02-28 11:35:31 +01:00
Dele Olajide
5a9f8218c8
Fix issue 1896 (#1897)
* fix issue https://github.com/conversejs/converse.js/issues/1896

* Added issue to CHANGES.md
2020-02-28 11:24:25 +01:00
JC Brand
2af93f4492 modtools: settings for which roles/affiliations may be queried or assigned 2020-02-22 23:16:22 +01:00
JC Brand
61e86a3c23 Fixes #1535
Add option to destroy MUC in the dropdown context menu.
Also add a confirmation dialog.
2020-02-22 20:22:02 +01:00
JC Brand
62ef18a027 muc_fetch_members now accepts an array of affiliations 2020-02-20 18:39:56 +01:00
GriZmio
897d3af277
Allow ignore bootstrap modules at build (#1852)
* This allow you to ignore some bootstrap modules you have already included/imported
to your project. Fix error: In a webpage you are already using bootstrap and have
a dropdown, but you have to click twice to make it work, because conversejs added
another handler.

* Add:
   - Allow ignoring bootstrap modules using environment variable: BOOTSTRAP_IGNORE_MODULES="Modal,Dropdown".
     Example: export BOOTSTRAP_IGNORE_MODULES="Modal,Dropdown" ; make dist
2020-02-11 09:53:37 +01:00
JC Brand
17b86f0491 Update changelog 2020-01-30 17:39:40 +01:00
Christoph Scholz
a472a0806e show headline messages in controlbox 2020-01-23 11:32:15 +01:00
JC Brand
929a00e1cd Fixes #1836 2020-01-16 13:48:46 +01:00
JC Brand
9ce315dece Bugfix. Handle stanza that clears the MUC subject 2020-01-14 10:07:23 +01:00
Christoph Scholz
40726e06e9 A user can now add himself as a contact 2020-01-13 10:30:00 +01:00
Christoph Scholz
e2d744ddc4 config option for roomid validation 2020-01-13 09:01:21 +01:00
Christoph Scholz
d0ee41d4fb focus now on jid field after controlbox is loaded 2020-01-11 23:26:36 +01:00
Christoph Scholz
36e56052bc don't log error if user has no bookmarks 2020-01-10 21:12:59 +01:00
JC Brand
916e300a79 Updates #1313 and #1793: Send button improvements 2020-01-10 15:40:46 +01:00
Christoph Scholz
7d94c712c8 notification is now clickable 2020-01-10 11:55:17 +01:00
JC Brand
16a40a0974 Fix broken changelog links and add missing config entry 2020-01-10 10:26:01 +01:00
JC Brand
cd60614f88 Release 6.0.0 2020-01-09 17:15:43 +01:00
JC Brand
4018dd959e Fixes #1764: Incorrect URI encoding in references 2020-01-09 14:59:45 +01:00
JC Brand
2dae07fa87 Fixes #1791: Adhere to the auto_focus setting 2020-01-09 14:28:43 +01:00
JC Brand
ef1f16c186 Fixes #1767: Remove JID so that credentials_url is called...
when the user logs out and then in again
2020-01-09 11:05:37 +01:00
Christoph Scholz
13652f6a6f Errors caused by malformed URLs are now caught 2020-01-09 10:59:19 +02:00
JC Brand
0524352446 Fix linting errors and update changelog 2020-01-07 15:59:29 +01:00
JC Brand
8b6c902c4c Set VCards via events, thereby reducing coupling
- Rename `chatRoomOpened` event to `chatRoomViewInitialized`
- Rename `chatBoxInitialized` to `chatBoxViewInitialized` and trigger only for `ChatBoxView` instances.
- New event `headlinesBoxViewInitialized`
- Trigger the `chatBoxInitialized` event when a new `_converse.ChatBox` is opened.
2019-12-18 15:20:51 +01:00
JC Brand
b0e66232d3 Fixes #1253: Show contacts with unread messages at the top of the roster 2019-12-18 11:42:26 +01:00
Dele Olajide
890db3427f Handle message notifications about affiliation change for users not in a room
See https://git.happy-dev.fr/startinblox/components/sib-chat/issues/96
2019-12-06 12:55:07 +01:00
raphaelSeguin
97b8ecbbdf Display status avatars in the occupants list 2019-12-05 14:13:52 +01:00
JC Brand
b1c9af3ed0 Various improvements to resizing of occupants view.
- Remove need for the `converse-mouse-events` plugin.
- Register `mousemove` and `mouseup` handlers only when necessary and only inside the MUC DOM element.
- Restore converse-dragresize to roughly it's original state before work started on this.
- Move `applyDragResistance` to utils.

updates #1640
2019-12-05 09:32:48 +01:00
JC Brand
0c4da63e07 Merge branch 'pullRequest_SkalierungTeilnehmerListe' of github.com:worlword/converse.js 2019-12-04 14:55:47 +01:00
JC Brand
dffe3d1a26 smacks: Set enable_smacks to true as default 2019-12-03 13:54:28 +01:00
JC Brand
c3447dd205 New config option: `persistent_store`
Allows for using IndexedDB as the persistent store, instead of localStorage
2019-12-03 13:51:57 +01:00
JC Brand
5232019ed7 roster: Replace lodash methods with native ones 2019-12-03 12:37:26 +01:00
JC Brand
5809c97828 Fixes #1666. Fixes #1792. Add scrollbars for modals 2019-12-03 11:08:35 +01:00
JC Brand
9bff567b3c Fixes #1796 2019-12-03 10:57:01 +01:00
JC Brand
53ced8c763 muc: Don't restore messages from cache...
if we're just going to clear them again

This avoids flashing of messages followed by a spinner.
2019-11-29 09:58:38 +01:00
JC Brand
d7d810ba89 Improvements to rendering MUC MAM logs before joining
- Add config variable `muc_show_logs_before_join`
- Restore nickname form for the original use-case (when not showing MAM logs before joining).
- Render nickname form in the `.muc-bottom-panel` when showing MAM logs (instead of in a modal)
- Show a message when there aren't any archived messages to show
- Fix converse-mam so that chat logs are properly fetched before entering a MUC

closes #1266
2019-11-29 09:23:15 +01:00
JC Brand
3ffb56baa2 Replace debug configuration setting with loglevel 2019-11-22 14:23:19 +01:00
JC Brand
e4010185dc Add new config option allow_message_retractions 2019-11-22 13:50:36 +01:00
JC Brand
b4dafcc45b Add support for XEP-0424 and XEP-0425
- Add support for switching ephemerality after message creation
- Move more methods from ChatBox and ChatRoom to utils/stanza.js
- Rename 'ephemeral' to 'is_ephemeral' since it's a boolean
2019-11-22 13:50:36 +01:00
JC Brand
e85afc9c7c Update changelog after 5.0.5 release (from the 5.x.x branch) 2019-11-20 11:23:55 +01:00
JC Brand
e7661b725e Updates #1760: Private messages no longer received after websocket reconnect 2019-11-18 22:01:02 +01:00
ndoell
b94e5653a9 Add resize functionality to occupants-list in MUC.
This adds the ability to resize the MUC-Member-List in all MUCs. The
MUC-Member-List can be scaled between 20% width of the MUC and 75% of
the MUC.
2019-11-13 19:39:35 +01:00
Dele Olajide
1f673b7aae StartinBlox PR to fix issues
1. enable avatars in autocomplete
2. change search/filter type for automcomplete
2019-11-12 16:22:37 +01:00
JC Brand
879e165ae5 Refactoring
- Move headless one-on-one chat functionality into converse-chat
- Split converse-headline into converse-headlines and converse-headlines-views
- Add api in `_converse.api.chatboxes` for creating chatboxes
- Add `_converse.api.controlbox.get` method
2019-11-04 15:05:50 +01:00
JC Brand
93d56898b7 Fixes #1772. Wait for roster to be fetched 2019-11-03 19:34:55 +01:00
JC Brand
23797dee21 _converse.api.alert.show is now _converse.api.show
Instead of taking an integer for the `type`, "info", "warn" or "error" should be passed in.
2019-10-31 14:42:44 +01:00
JC Brand
1fa203c990 Support for IndexedDB. updates #1105
Depend on latest backbone.browserStorage which has support for IndexedDB
via localforage.

Storage operations are now asynchronous and transactional.

Bugs fixed (mostly by waiting for operations to complete):

* Rooms are now fetched asynchronously, so wait before triggering `show`
  or when closing.
* Make sure chat create/update transactions complete before firing events
* Make sure chats and messages have been fetched before creating new ones.
* When doing a `fetch` with `wait: false` on a collection and then
  creating a model in that collection, then once the read
  operation finishes (after creating the model), the collection is emptied again.
* Patch and wait when saving.
  Otherwise we have previously set attributes overriding later ones.
* Make sure api.roomviews.close returns a promise

Test fixes:

* Chats are now asynchronously returned, so we need to use `await`
* Wait for the storage transaction to complete when creating and updating messages
* Wait for all chatboxes to close
    Otherwise we get sessionStorage inconsistencies due to the async nature of localforage.
* Wait for room views to close in spec/chatroom.js

In the process, remove the `closeAllChatBoxes` override in
converse-controlbox by letting the `close` method decide whether it
should be closed or not.
2019-10-30 13:02:23 +01:00
JC Brand
acf14cf8cb Fixes #1757
- Increase z-index for chatbox flyouts so that they appear above the controlbox
- Also fix a margin offset bug for the controlbox (in smaller viewports)
2019-10-29 11:43:09 +01:00
JC Brand
b6d5077d04 Refactor _converse.XMPPStatus out into headless/converse-status.js
Also move some other methods out of `converse-core` into the plugins
that use them.
2019-10-18 11:13:09 +02:00
JC Brand
ea54644a45 Fixes #1089. When filtering by online, show all non-offline users 2019-10-17 13:30:23 +02:00
JC Brand
f7a57f272e Remove show_only_online_users config setting.
Doesn't appear to be very useful. IIRC it was added as a workaround for
slow roster issues.
2019-10-17 13:17:37 +02:00
JC Brand
e6e23a1a82 Add initial support for custom emojis 2019-10-17 12:12:08 +02:00
JC Brand
50b77e8608 Fixes #1733 2019-10-13 19:48:39 +02:00
JC Brand
9d77a4ef97 Fixes #129 Add support for XEP-0156.
Only XML is supported for now.
2019-10-11 17:46:13 +02:00
Christoph Scholz
86a6164713 fixed links in CHANGES.md 2019-10-11 12:39:32 +02:00
JC Brand
b63b080419 chatboxes: wait until messages are fixed before returning new chatbox
Fixes #1691
2019-10-10 14:44:13 +02:00
Christoph Scholz
2d44144b69 prevent message correction for files 2019-10-10 14:19:34 +02:00
JC Brand
266fe131a9 Release 5.0.4 2019-10-08 14:22:56 +02:00
JC Brand
b70fde159d Fixes #1738. Allow webpack's publicPath to be specified at runtime 2019-10-06 21:52:37 +02:00
JC Brand
5c532e3b92 Build po files and add Vietnemese as available language 2019-10-06 21:52:09 +02:00
Christoph Scholz
1c7c25091f new config option: allow_message_corrections 2019-10-04 15:42:38 +02:00
Christoph Scholz
bce8dc9113 Fixes #1714
don't notify if only message delivery receipt
2019-09-24 13:27:49 +02:00
Christoph Scholz
cd5dacbe29 Process stanzas from mam one-by-one 2019-09-21 13:26:36 +02:00
JC Brand
e377c9bd6f Fixes #1712 2019-09-16 14:04:28 +02:00
laszlovl
ab9b2d64ab Fix incorrectly detecting every message with a duplicate ID as correction 2019-09-16 13:07:14 +02:00
JC Brand
39896b508b Release 5.0.3 2019-09-13 15:19:00 +02:00
JC Brand
68e34351ed Reject unencapsulated forwarded messages
since we don't support XEP-0297 on its own
2019-09-13 13:05:21 +02:00
JC Brand
a6b7d0d972 Emit chatBoxFocused and chatBoxBlurred events for emoji picker input 2019-09-12 11:05:27 +02:00
JC Brand
5bf0955193 Release 5.0.2 2019-09-11 17:44:38 +02:00
JC Brand
35e97c2353 Ignore MAM chat messages not sent from yourself 2019-09-11 14:18:21 +02:00
JC Brand
0af9bc8ffc Fixes #1704
Ignore carbon groupchat messages
2019-09-11 14:18:21 +02:00
JC Brand
26c1dbb0eb Updates #1705. Add getRoomsPanel method to avoid dangling pointer 2019-09-11 11:28:28 +02:00
JC Brand
46ccc1a87f Fixes #1692 2019-09-06 16:14:30 +02:00
JC Brand
cc91f3751e Add listenTo instead of on to avoid memory leaks 2019-09-06 16:04:06 +02:00
JC Brand
76f2b66445 Add a po loader for webpack.
- Removes the need for generating and keeping json files
2019-08-23 11:42:37 +02:00
JC Brand
8aaf50d58c Use webpack's dynamic imports feature for fetching emoji JSON 2019-08-23 09:18:10 +02:00
Dele Olajide
3482bbcd61 Update CHANGES.md 2019-08-19 09:16:19 +02:00
JC Brand
8f571ff148 Release 5.0.1 2019-08-14 12:56:44 +02:00
JC Brand
9c024757b6 Bugfix: TypeError: o.getAttribute is not a function converse-chatview.js
can cause messages to not appear.

* Check against null not Element.
* Avoid iterating over non-Element nodes
2019-08-14 12:10:32 +02:00
JC Brand
89ac4a6969 Show error message with option to retry when MAM query times out 2019-08-13 11:08:03 +02:00
JC Brand
2ba2ce0c0b Update default value in docs and changelog 2019-08-10 18:48:00 +02:00
JC Brand
aee6a192d1 Add a new command /modtools
in which you can set user affiliations and roles.

Also, let getAffiliationList return an Error instead of `null` if you're
not allowed to fetch a particular affiliation list.
2019-08-09 23:30:14 +02:00
JC Brand
bc27b3a36a Release 5.0.0 2019-08-08 18:13:12 +02:00
Réda Housni Alaoui
edcb8e28c2 Fix #1664 Blacklisting converse-profile makes the control box totally blank 2019-08-05 11:01:39 +02:00
JC Brand
7861ed7b54 Fixes #1403: Rename show_chatstate_notifications
to `show_chat_state_notifications`
2019-08-03 21:52:14 +02:00
JC Brand
8a9a0a4b19 Add support for paging through MAM results when catching up
Fixes #1548
2019-08-03 21:44:02 +02:00
Réda Housni Alaoui
c2db667321 Shadow dom: TypeError: Cannot read property 'parentElement' of null caused by MinimizedChatsToggleView 2019-08-02 16:30:25 +02:00
JC Brand
0b43082383 Add check and update changelog 2019-08-01 16:26:29 +02:00
JC Brand
ea36d53f78 Re-add the keepalive options.
It's unlikely that `keepalive` needs to be set to `false`, but there are
some edge cases where it might be useful.

Here's a breakdown of the different configurations of `keepalive` and `auto_join`:

---

* auto_login: false, keepalive: true

This is the default config. Users need to log in manually, but then
Converse will try to reconnect them when the page reloads.

* auto_login: true, keepalive: true

Also very popular configuration. Used with `credentials_url` or `prebind_url`.

* auto_login = `true`, keepalive = `false`

Not sure what this could be useful for. No currently known application.

* auto_login = `false`, keepalive = `false`

Useful when you want some kind of specific action to trigger login, but
you don't want to maintain that state across page reloads.

Also relevant when using a websocket connection with anonymous login.
With websocket it's impossible to maintain anonymous sessions across page
reload because the the session gets removed server-side as soon as the
websocket connection drops and the server won't accept a full JID with
password for an anonymous connection anyway (which could happen upon
page reload when Converse tries to login in again if `keepalive` was `true`).
2019-07-26 18:08:38 +02:00
JC Brand
c4ad02d4e3 New config setting: muc_fetch_members 2019-07-26 13:32:21 +02:00
JC Brand
8938245cdd Update various dependencies to their latest versions 2019-07-11 09:46:17 +02:00
Malcolm
b163d05323 ADD Omemo default support (#1476) 2019-07-10 06:51:41 +01:00
JC Brand
3ca6ac7f50 Fixes #1524 Don't include own device in OMEMO message
This change reverts the significant part of 1dfdb36d20

I can't say that I understand why libsignal throws `Error: Invalid signature`
when you try to build a session for your own (sending) device, but given that
messages can only be decrypted once, I guess it isn't really necessary
to encrypt for your own device, since you already have the plaintext.

In addition I've added some error handling so that we can recover
gracefully when session building fails for a subset of devices.
2019-07-05 19:21:05 +02:00
JC Brand
da1d87648c New config option clear_messages_on_reconnection
In some cases, it might be desirable to clear cached chat messages once you've
reconnected to the XMPP server.

For example, if you want to prevent the chat history from getting too long or
if you want to avoid gaps in the chat history (for example due to MAM not
returning all messages since the last cached message).

If you're using OMEMO, then you probably don't want to set this setting to
``true``. OMEMO messages can be decrypted only once, so if they then
subsequently get cleared, you won't get the plaintext back.
2019-07-04 08:28:12 +02:00
Kim Alvefur
28b51f75ce Support sending files from clipboard (fixes #1585) 2019-07-03 23:46:24 +02:00
JC Brand
9fc133c608 Fix order in changelog 2019-06-28 20:01:30 +02:00
JC Brand
2cbc4aaa50 Fixes #1494. Trim whitespace around messages 2019-06-26 10:59:56 +02:00
JC Brand
83bc851f20 Fixes #1455. Updates #1619
Avatar didn't update a second time due to `canvas` element being expected
2019-06-26 10:24:27 +02:00
Nÿco
5376d267bf Double entry
"- Properly handle message correction being received before the corrected message"
was there twice
2019-06-20 10:03:13 +02:00
Chaimaa ZEGOUMOU
a0b925ef6e Fixes #1071. x clear cross now same size as text (#1609) 2019-06-19 15:37:55 +02:00
JC Brand
c32070c9bb Autocomplete fixes
- Fixes #1575. Height not properly set on MUC invitation list
- Add new configuration setting: `muc_mention_autocomplete_min_chars`
- Bugfix. `min_chars` setting for MUC mentions wasn't having an effect
2019-06-19 15:01:30 +02:00
JC Brand
36549bf61d Revert flexbox, column-reverse changes
Unfortunately this doesn't work on Firefox and there's no proper
workaround. https://github.com/philipwalton/flexbugs/issues/108

Reverts:

Revert "Bugfix. Properly insert error messages and spinner"
This reverts commit 6a419cc145.

Revert "Use flexbox to keep the chat scrolled down"
This reverts commit dd91d3cc55.
2019-06-19 11:45:54 +02:00
JC Brand
303a8b63af Fixes #1495. Mentions should always include a URI attribute 2019-06-19 09:35:39 +02:00
JC Brand
7455ce1b07 Fixes #1579 and fixes #1538 2019-06-19 09:24:44 +02:00
JC Brand
b2553a44e1 New configuration setting: auto_focus 2019-06-18 14:04:26 +02:00
JC Brand
dd91d3cc55 Use flexbox to keep the chat scrolled down
By using `display: flex` and `flex-direction: column-reverse`, the chat
now automatically scrolls down when loaded, without requiring any
extra JavaScript.

We still need to scroll down with JavaScript when sending a message.

By using `column-reverse`, the messages container now works in reverse.
So the newest message is the first element in the container and the
oldest message is the last. This is the reverse of before.

Due to this, this change will likely break some plugins.
2019-06-18 11:37:07 +02:00
JC Brand
19f6bce246 Message correction improvements. Updates #1142
Up and down arrows only serve as message correction shortcuts if the
textarea is empty.

This means that:

- Up arrow doesn't start correction of previous message if we're currently writing a message
- Down arrow doesn't erase currently written message

This is based on user-feedback and is also how Slack handles these
shortcuts.
2019-06-17 09:04:03 +02:00
JC Brand
38d0d8360b New config setting message_limit
for limiting messages to a certain number of characters.
2019-06-16 21:52:56 +02:00
JC Brand
f3c4dbc344 Avoid unnecessarily sending out a presence stanza
- Set roster_fetched flag when we get an empty IQ[type="result"] stanza
- Set `restored` flag when resuming in converse-smacks
- Don't trigger change event when fetching xmppstatus values
- Removed two events, since we can just listen to `change` on `_converse.xmppstatus`.
2019-06-13 13:33:01 +02:00
JC Brand
38a232fd45 Move BOSH code into a plugin
- Remove the `keepalive` configuration setting. It is now always implicitly `true`.
- Remove the `expose_rid_and_sid` configuration setting.
- A `prebind_url` is now mandatory when setting `authentication` to `prebind`.
- It's no longer possible to pass in `rid` and `sid` values to `converse.initialize.
2019-06-05 11:35:48 +02:00
JC Brand
51f2ab9100 Fixes #1196. Use alternative connection method upon connfail 2019-06-04 15:11:32 +02:00
JC Brand
3d3c27001f Fixes #1445 Participants list uses big font in embedded mode 2019-06-04 12:20:53 +02:00
JC Brand
b57e3e49c1 Fixes #1330. Missing room name in MUC invitation popup 2019-06-04 12:08:14 +02:00
JC Brand
f2ac9ef4d7 converse-muc: Support for XEP-0410 to check whether we're joined 2019-06-03 11:41:34 +02:00
JC Brand
699fe0df63 Initial support for the CredentialsContainer web API 2019-06-03 09:43:24 +02:00
JC Brand
f30d415f76 Refactor reconnection 2019-06-03 09:43:24 +02:00
JC Brand
7b11d85503 Add support for XEP-0198 Stream Management
- New plugin `converse-smacks`
- New config option `enable_smacks`
- Rename session cache id from `converse.bosh-session` to `converse.session`
- Refactor logout and login as consistently used api methods
- Refactor session cache to store per JID

Fixes #316
2019-06-03 09:43:12 +02:00
JC Brand
0688907e0d Allow events to be synchronous
When a synchronous event is fired, Converse will wait for all
promises returned by the event's handlers to finish before continuing.
2019-06-03 09:41:29 +02:00
JC Brand
267fb38e0c Remove the forward_messages config option 2019-05-31 16:07:51 +02:00
JC Brand
be0274f1f0 Fixes #1586. Not possible to kick someone with space in nick
Refactored moderation by moving certain methods to the model and
consolidating setting of roles and affiliations into new methods.
2019-05-27 12:27:12 +02:00
JC Brand
f20aee6906 Fixes #1576
When using `auto_login` and logging out, Converse gets stucks with an infinite spinner.
2019-05-26 15:30:15 +02:00
JC Brand
f387c947f5 Allow the full app to be embedded.
- new config option `singleton`.
- new plugin `converse-uniview`
- removed `converse-embedded`.
- various CSS changes, to properly render an embedded full app
- don't re-open cached and non-autojoined chats in singleton mode

The goal here is to extend the `embedded` `view_mode` so that the full app can
also be embedded, not just a single MUC or private chat.

To do this, we'll need to differentiate between multi and singleton chat apps.

* A singleton chat app contains only a single chat.
* A multi-chat app can contain zero or more chats

So we introduce a new config option, `singleton`, which when used with
`view_mode` set to `embedded` will determine whether a single chat or the full
app is embedded.

Similarly, in `overlayed`, `fullscreen` and `mobile` view modes, `singleton`
set to true will allow only one chat within the parameters of that view mode.

We're appropriating the word `singleton` and introducing the concepts of
`uniview` and `multiview` (see a785ca8) to cover what was
previously meant with `singleton`.

updates #1297
2019-05-24 20:39:19 +02:00
JC Brand
7ab59ad63e Refactor MAM and clear private chats upon reconnection
- Add `onReconnected` method for chatboxes to clear messages
- Move MAM models to headless build.
- New event `onChatReconnected`
2019-05-22 14:10:19 +02:00
JC Brand
271c79eae8 Refactor message corrections
- Save date for older message versions and display it in the modal
- Properly handle the correction being received *before* the corrected message
2019-05-22 13:26:46 +02:00
JC Brand
7950f7c2ac Change muc_show_disconnection_status to muc_show_join_leave_status 2019-05-18 06:34:29 +02:00
supun19
d1572f3506 iOS viewport was less than 100vh so had to redefine vh units
fixes #1571
2019-05-15 18:32:11 +02:00
JC Brand
12989ab241 New event: chatBoxBlurred 2019-05-14 16:26:25 +02:00
supun19
dd0821076d Groupchat auto-configuration now supports list-multi fields 2019-05-14 15:28:06 +02:00
JC Brand
d0ddda8244 New config option muc_show_disconnection_status 2019-05-14 13:29:43 +02:00
JC Brand
7a990ae0b9 Fixes #1558, this.get is not a function 2019-05-13 14:37:48 +02:00
JC Brand
6247f65063 Add changelog entry for #1465 2019-05-10 12:57:30 +02:00
JC Brand
2526d80464 Change api.disco.supports to resolve to a Boolean
Also add a new API method `api.disco.features.get` for the use-case
where you still want the feature object to be returned.
2019-05-07 10:27:25 +02:00
JC Brand
c3dac272f8 Replace moment with DayJS 2019-05-06 14:27:18 +02:00
JC Brand
15b2273631 _converse.api.archive.query now returns a Promise
instead of accepting a callback functions.
2019-05-03 19:47:49 +02:00
JC Brand
8bb852b139 Updates #1554
Room auto-configuration broke if the config form contained fields with type `fixed`
2019-05-03 18:04:03 +02:00
JC Brand
52ea8d5ab6 Fixes #1550
Legitimate carbons messages blocked due to erroneous forgery check
2019-05-03 14:11:29 +02:00
supun19
eec51f9d62 Doc rooms api (#1551)
* Rooms Api
number of parameters in the documentation was made 2 from 3 as api which is used to open a room with default configuration has only 2 parameters.
2019-05-03 11:38:05 +02:00
JC Brand
d868b9a9f7 Continuously retry to fetch login credentials 2019-05-02 14:53:42 +02:00
JC Brand
b9e5658112 Message deduplication bugfixes and improvements.
- Add a new method to check for dupes based on the message text.
- When checking for dupes based on origin_id, no need to restrict to
  only our own.
2019-04-27 18:09:58 +02:00
JC Brand
dedede56f8 Rename muc_disable_moderator_commands to muc_disable_slash_commands
Since those commands aren't only about moderation
2019-04-25 11:32:07 +02:00
JC Brand
c72dc74022 In the menu, only show allowed commands 2019-04-25 10:48:33 +02:00
JC Brand
e189acc8c9 Returning nick with credentials_url complicates things too much 2019-04-23 14:53:48 +02:00
JC Brand
624cf4f435 Allow nickname to be provided by the credentials_url 2019-04-23 12:06:40 +02:00
JC Brand
25a0a898f2 Don't restore a BOSH session without knowing the JID 2019-04-22 14:33:49 +02:00
JC Brand
725a382e3b Refactor initialization and defaults for chat boxes
- Let box_id start with char for valid HTML.
- No need to use SHA1 for box id
- No need for the user_id attribute.
- Set nickname when we set the roster contact.

Also...

- _converse.api.contacts.get is now async
- _converse.api.chats.create is now async
2019-04-18 16:14:51 +02:00
JC Brand
d2166ce3dd Remove deprecated API methods
since the next release will be a major one.
2019-04-16 16:57:55 +02:00
JC Brand
ee78ec1333 Add force parameter to _converse.chats.open
This changes the API method's current behavior by not automatically
maximizing (in `overlayed` view mode) or bringing a background chat into
foreground (in `fullscreen` view mode). Instead `force` needs to be set
to `true` for that to happen.
2019-04-16 16:42:15 +02:00
JC Brand
f48adb386e Fixes #1296 2019-04-16 12:59:36 +02:00
JC Brand
1328168d1e Fixes #1532 Converse reloads on enter pressed in the filter box 2019-04-11 23:44:16 +02:00
JC Brand
f84c201437 Hide the textarea when a user is muted in a groupchat 2019-04-11 01:40:16 +02:00
JC Brand
a75c118a2c Prioritize roster nickname as message and chatbox display name
Set reference to roster contact on the message and chatbox object and
listen for changes to the nickname.

Currently, because chat boxes are fetched and initialized before the
roster, messages and chats are repainted with the correct display name
only later, causing a "flash" effect.

Ideally we would only initialize the chat boxes after the roster
contacts have been fetched, but this is currently not easily possible
because we need the control box to render before everything else.
2019-04-09 17:20:41 +02:00
JC Brand
87337eaeef Bugfix. Modal auto-closes when you open it a second time 2019-04-08 21:45:09 +02:00
Marc Laporte
1a22a94491 Clarify section title
I hope this is what you meant :-)
2019-04-08 17:48:52 +02:00
JC Brand
e987214555 For roomspanel, don't set muc_domain if its locked 2019-04-05 13:14:57 +02:00
JC Brand
50d9b2ec80 Mention MAM:1 incompatibility 2019-04-04 14:07:44 +02:00
JC Brand
86b7633e59 Mention all translations 2019-04-04 13:19:34 +02:00
JC Brand
acab0339f1 New release 4.2.0 2019-04-04 12:33:08 +02:00
JC Brand
1dfdb36d20 Don't filter out own device when sending OMEMO message 2019-03-30 13:55:25 +01:00
JC Brand
be1abdb5ff Add classes for easy styling 2019-03-28 15:43:29 +01:00
Christoph Scholz
dde815e0a8 Allow manual entry of jid with xhr_user_search_url 2019-03-28 15:38:56 +01:00
JC Brand
d300be58cc Fixes #144. Fall back to JID if name is not available 2019-03-28 15:37:01 +01:00
JC Brand
34b8cd2ee6 Prevent user from adding themselves as contact 2019-03-28 15:36:08 +01:00
JC Brand
cc865de0f0 Add new config setting autocomplete_add_contact
Determines whether search suggestions are shown in the "Add Contact" modal.
2019-03-28 14:34:12 +01:00
JC Brand
b726a2353c Remove Awesomeplete in favor of _converse.AutoComplete 2019-03-28 12:43:34 +01:00
JC Brand
03f9eb95da Fixes #1467. Fix rendering of URLs enclosed with sharp brackets
such as <https://example.org>
2019-03-27 11:24:55 +01:00
JC Brand
225312694f Two small updates
* Ensure that outgoing messages are also marked as single emojis
* Also set msgid to origin-id for sent groupchat messages
2019-03-26 22:03:56 +01:00
JC Brand
3ce3d661bc Make sure required registration fields have "required" attribute 2019-03-26 14:52:26 +01:00
JC Brand
9f290dab25 New config setting locked_muc_nickname
When set, the "Nickname" field won't be shown in the "Add groupchat"
modal and instead the nickname will be automatically set (based on other
config settings).
2019-03-26 13:29:33 +01:00
JC Brand
32f0eb5488 Fixes #1407. Don't allow empty value for MUC nickname 2019-03-26 13:03:42 +01:00
JC Brand
a9ce9acff2 Make sure nickname config option takes precedence
above other nickname sources.
2019-03-26 11:31:11 +01:00
Guus der Kinderen
bde1b9529b Minimized bookmarked chatboxes should not be always maximized after page reload
This is a fix for https://github.com/conversejs/converse.js/issues/1508
2019-03-26 11:06:32 +01:00
Christoph Scholz
10da92ec5b fix LMC with Conversations 2019-03-22 17:37:28 +02:00
JC Brand
27557d6a04 Document _converse.ChatBox.prototype.sendMessage as an API method
Until now, we've only been explicitly documenting the `_converse.api`
namespace and only considered the methods under it as forming the API
contract (which determines how we do semver releases).

It appears as if we've reached a point where trying to keep everything
under the `_converse.api` namespace no longer makes sense. Certain
methods are applicable to particular models and trying to shoehorn them
into the `_converse.api` namespace seems clunky and non-intuitive.

I've therefore decided to slightly refactor `sendMessage` to let it take
two simple parameters and to document it with JSDoc so that it's
presented as an API method, albeit only available on a chat model.

updates #1496
updates #1504
2019-03-21 21:03:02 +01:00
JC Brand
d87551328d Upgrade to Strophe 1.3.2 2019-03-21 07:28:37 +01:00
Christoph Scholz
0957b7086f Don't prompt for reason if auto_join_on_invite 2019-03-19 22:26:42 +02:00
JC Brand
4c50ac23e7 Add Jed as dependency of @converse/headless
fixes #1352
2019-03-15 15:49:12 +01:00
JC Brand
5b4ce87a4d Don't send out receipts or markers for MAM messages
Eventually we need to add better support for receipts and markers of MAM
messages.

We'll need to do the following:

* First check whether the MAM page already contains the receipts or markers, to avoid duplication
* Only ever in catchup mode
* Only after full catchup to ensure that the receipt is not in a different page than the message
2019-03-12 13:02:10 +01:00
Meitar M
76bff83ca3 Allow http: image URLs if Converse.js is loaded on an insecure origin.
Currently, in order for Converse.js to recognize a pasted URL as an
image, it must be an URL whose protocol is `https:` (`https` in the
URI.js library's notation). This is sensible, but means that any
non-HTTPS image URL is not recognized as a valid URL (and thus will not
be rendered inline, even if `show_images_inline` is set to `true`).

It is important to always check for HTTPS URLs when in a secure context
(i.e., the initial page load was requested via HTTPS) in order to ensure
that non-secured content does not mix with secured content. However, the
inverse is not true: if the original page was loaded over HTTP, then
enforcing HTTPS for images adds arguably no meaningful protection while
also breaking the `show_images_inline` feature for the edge cases where
Converse.js is deployed without HTTPS and a user pastes an HTTP URL.

This patch changes the behavior of the `isImageURL` method such that the
requirement for the pasted URL's protocol to be `https:` is enforced
only when the `window.location.protocol` itself is also `https:`. By
doing this, we ensure that secure origins (i.e., when Converse.js is
loaded over HTTPS initially) are still secured and cannot have non-HTTPS
content introduced to the page via a pasted non-HTTPS URL, however it
also allows non-HTTPS origins to render both HTTP and HTTPS image URLs.
2019-03-09 14:15:22 +02:00
Christoph Scholz
ed9d2a2526 make it configurable whether to respect autojoin 2019-03-09 14:10:40 +02:00
Axel Viala
b51d98d6d1 Fix #1327: Refusing url and email as mentions
Before the function `extractReference` in
`/src/headless/converse-muc.js` matched url and email.

Fix: https://github.com/conversejs/converse.js/issues/1327
2019-03-07 16:53:27 +01:00
JC Brand
2de794abc1
Merge branch 'master' into master 2019-03-06 15:10:26 +01:00
Holger Weiss
a15aec3519 Assume "text-single" as default form field type
As per XEP-0004, the default "type" of data form fields is
"text-single", so a missing "type" attribute should not be treated
differently.

This fixes handling of CAPTCHAs offered by ejabberd.
2019-03-06 15:08:41 +01:00
Christoph Scholz
37800d92d3 allow drag & drop also in MUCs 2019-03-05 18:21:07 +01:00
Emmanuel Gil Peyrot
3aa9ee1ba0 Replace http: with https: in xmpp.org links 2019-03-04 17:49:44 +01:00
wrooot
86730b86bf #1474 Updated lithuanian (lt) translation 2019-03-03 14:36:13 +02:00
JC Brand
b15ebdde40 Update to Backbone 1.4.0 and use fork of Backbone.NativeView
with `_setElement` fix.

See https://github.com/akre54/Backbone.NativeView/pull/29
2019-03-01 11:56:22 +01:00
JC Brand
310b2c723b Fixes #1149
With xhr_user_search_url, contact requests are not being sent out
2019-03-01 11:56:22 +01:00
JC Brand
d4fbdf5629 Fixes #1213. Switch roster filter input and icons 2019-03-01 11:56:22 +01:00
JC Brand
c26dde34f9 Allow setting of debug mode via URL with /#converse?debug=true 2019-02-27 16:28:30 +01:00
JC Brand
61a0e1bb16 New config setting show_client_info
Determines whether we show the icon for opening the client's "About" modal.
2019-02-27 14:42:27 +01:00
JC Brand
49da581d14 Fixes #1400. When chat message is only an emoji, enlarge it 2019-02-27 10:34:47 +01:00
JC Brand
519bd54acb Fixes #1457. Wrong tooltip shown for "unbookmark" icon 2019-02-26 12:08:48 +01:00
JC Brand
d3a4555165 Re-add support for muc_domain and add locked_muc_domain.
updates #1373
2019-02-26 11:58:01 +01:00
JC Brand
2ddd918f6a Fixes #1437. List of groupchats doesn't scroll 2019-02-26 11:57:36 +01:00
JC Brand
5afb3051cc New release v4.1.2 2019-02-22 16:49:45 +01:00
JC Brand
f123f483ae Fixes #1406 2019-02-21 09:19:02 +01:00
JC Brand
ce2ae87df2 Bugfix. Open groupchats not shown when logging in after disconnection
* Replace `tearDown` overrides with event handlers.
* Move presence listeners to `connected` event handler, otherwise they
  don't get called when logging in again after disconnection.
* Add `clearSession` listeners to clean up upon disconnection.
* Use `Promise.all` instead of listening for multiple events.
2019-02-20 23:08:27 +01:00
JC Brand
253958ed93 Prevent duplicate messages by comparing MAM archive id to XEP-0359 stanza ids 2019-02-19 23:08:29 +01:00
JC Brand
e389d77107 New release 4.1.1 2019-02-18 20:40:55 +01:00
André Berenguel
8dcb327ead Update contact nickname when receive a roster push 2019-02-18 20:23:20 +01:00
JC Brand
af0093bd39 Bugfix: MUC invite form not shown 2019-02-18 15:42:56 +01:00
JC Brand
d08f738656 Bugfix: Restore textarea size after sending message 2019-02-14 13:21:26 +01:00
JC Brand
8d00294681 Use origin-id to check for reflected messages.
Also, store the returned `stanza-id` on the message.
2019-02-14 11:33:28 +01:00
JC Brand
5b25d5daaa Don't send markers to someone not on your roster
Updates #324
2019-02-13 19:32:02 +01:00
JC Brand
4c83a23382 Revert "Reject the waitUntilFeaturesDiscovered promise if query failed"
This reverts commit 01f0a65209.

Updates #1410
2019-02-13 15:44:17 +01:00
laszlovl
b172861d2c Dont run fetchRosterContacts async, to prevent processing presence before contacts are created
Fixes #1405
2019-02-13 09:13:45 +01:00
JC Brand
dbcf6002ff Fixes #1442 2019-02-12 19:10:46 +01:00
Witek
84e0ce6617 Change jcbrand to conversejs in releases urls (#1443)
* change jcbrand to conversejs in releases links
2019-02-12 18:19:18 +01:00
laszlovl
590d8769a9 Prevent duplicate messages on MUC join
Fixes #1414
2019-02-08 15:32:21 -07:00
Christoph Scholz
5e1f5785f9 fix moderator commands that change affiliation 2019-02-05 12:47:53 -07:00
Christoph Scholz
b667eae1c8 muc moderator commands can be disabled selectively 2019-01-30 03:42:12 +01:00
Holger Weiss
af091faf33 Resurrect muc_show_join_leave option
The option got lost in commit 9528d81c00.

Fixes #1263
2019-01-29 05:45:35 +01:00
JC Brand
4150a3a70b Add Esperanto as supported language 2019-01-29 05:40:34 +01:00
JC Brand
59a9c86fa5 Fixes #1417 2019-01-28 13:39:33 +01:00
JC Brand
d97deaea80 Fixes #1369
* Add test and changelog entry
* Also show message subject if available
2019-01-28 13:27:25 +01:00
Emmanuel Gil Peyrot
9702e9dee3 Add ARIA live region on chat-content
This asks screen readers to read every message received, and is
mandatory for blind users to get notified of new messages.
2019-01-23 14:01:27 +01:00
Christoph Scholz
9eee13e192 fix direct invite for membersonly room 2019-01-22 10:41:59 +01:00
JC Brand
a1795c29ba 3 small changes
- Set correct default value
- Set proper Makefile recipe dependency
- Fix rendering issue in changelog
2019-01-14 12:06:55 +01:00
Christoph Scholz
84be0fb9f7 new config option "roomconfig_whitelist" 2019-01-12 21:51:47 +01:00
JC Brand
a2f42d27a2 New release 4.1.0 2019-01-11 18:49:37 +01:00
JC Brand
79990f7e01 Don't unnecessarily set height on textarea 2019-01-11 18:38:09 +01:00
JC Brand
305376b27a Update changelog and build 2019-01-11 17:43:08 +01:00
JC Brand
dc07440de8 Bugfix. Don't create chats for messages without body 2019-01-10 21:47:50 +01:00
JC Brand
a4d608dcdf Save room features in separate model
As a namespacing mechanism to avoid clashes.
Fixes bug where two chats are shown as currently being active in the rooms list.
2019-01-10 12:15:59 +01:00
Christoph Scholz
eacd7fd933 implement /destroy command in muc 2019-01-03 13:09:13 +01:00
JC Brand
7d74319efd Fixes #1356 2019-01-03 11:45:52 +01:00
JC Brand
6f10f95d77 Document OMEMO for MUCs. Updates #1180 2018-12-21 06:29:21 +01:00
JC Brand
0b25800392 Add converse-pubsub.js 2018-12-20 21:51:16 +01:00
Christoph Scholz
d2d64952a0 set store hint on receipts and type='chat' 2018-12-17 15:20:21 +01:00
JC Brand
7ec6a0576e Fixes #1379 No longer an indication of unread messages in MUC 2018-12-16 12:30:41 +01:00
JC Brand
a389f52adb Fixes #1353 Don't expect delivery receipts to have type chat 2018-12-16 11:22:13 +01:00
JC Brand
46390b8956 Update changelog 2018-12-16 08:27:06 +01:00