Commit Graph

711 Commits

Author SHA1 Message Date
JC Brand
3e5bd34141 Fixes #2381 2021-03-03 22:25:04 +01:00
JC Brand
16e1f95790 New config setting: muc_show_ogp_unfurls 2021-03-01 14:00:28 +01:00
JC Brand
c11b3d03f4 Make sure dist/converse-headless.min.js gets built
Fixes #2377
2021-02-24 07:57:56 +01:00
JC Brand
5cab477bf4 fixes #2396: @converse/headless wrongly depends on CustomElement from the view layer 2021-02-24 07:36:10 +01:00
Dele Olajide
61dacfd2a5 fix #2409 - Integrate App Badging API for unread messages 2021-02-24 06:55:59 +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
JC Brand
9f5dbad589 Turn roster into a custom element 2021-02-09 15:48:21 +01:00
JC Brand
ccfb29f1b3 Turn BookmarksView into a custom element 2021-02-09 15:48:21 +01:00
JC Brand
1949356ede Work on turning chat views into custom elements
The eventual goal is to avoid UI-related stanza processing if the relevant chats
aren't in the DOM.

With the current architecture, chatboxes are created (and the stanzas
related to them processed) even if `#conversejs` isn't in the DOM.

* Initial work on making controlbox an element
* Create a shared base class
* Ceate ChatBoxViews proxy
* Update sass now that certain classes are moved to converse-chats element
2021-02-09 15:48:21 +01:00
Ariel Fuggini
758c46c5aa Fixes infinite loop bug when appending .png to allowed image urls 2021-02-09 15:38:06 +01:00
JC Brand
5d1b5ac6c9 Notifiations: Add new hook shouldNotifyOfGroupMessage 2021-02-01 17:14:35 +01:00
JC Brand
c0249b9c28 New configuration setting send_chat_markers
Can be used to fine-tune which (if any) of the XEP-0333 chat markers
will be sent out.
2021-01-15 11:11:38 +01:00
JC Brand
dcd1407109 New config setting mam_request_all_pages 2021-01-13 10:42:22 +01:00
JC Brand
3f47c4d3dd Use real JID in XEP-0372 references only when the MUC is non-anonymous 2021-01-04 14:24:23 +01:00
JC Brand
2121766623 More RAI improvements
- Add test for incoming RAI message
- Only enable RAI if the user is affilated in MUC being left
- Handle error presence indicating a resouce-constraint
- Don't unregister stanza handlers in `leave`, since we still want to
  listen to RAI-related stanzas. Instead unregister upon the `destroy`
  event.
2020-12-17 13:04:24 +01:00
JC Brand
e8eea6324e MUC: Send XEP-0333 markers with the MUC stanza id
See: https://xmpp.org/extensions/xep-0333.html#rules-muc
2020-12-14 16:30:13 +01:00
JC Brand
14c9b2f4ae Clear message cache when closing a MUC 2020-12-11 13:57:16 +01:00
JC Brand
d47c72711b Document the button hooks 2020-12-03 16:56:54 +01:00
Xavi Ferrer
f4b6b93b8b update info messages visibility 2020-12-03 11:45:25 +01:00
JC Brand
01ee942920 Styling fixes
* Calculate proper length for :geo URI matches
* Don't strip out line-break after quotes, instead use CSS `display: inline-block`
2020-12-01 10:21:21 +01:00
JC Brand
f86efca9a6 autocomplete: Use regex instead of hardcoded list...
to determine valid characters to form a boundary before an `@` mention

Also fixed an issue with mentions looking like they're part of URLs, by
first processing mentions separately.
2020-11-27 22:06:22 +01:00
Xavi Ferrer
8b9c97745f Allow selected characters to precede a mention 2020-11-27 14:12:29 +01:00
JC Brand
33f62bb93c Update changelog for previous revert and add title for img emoji 2020-11-26 14:25:54 +01:00
JC Brand
c002600ac5 Rename update_title setting to show_tab_notifications 2020-11-25 16:30:52 +01:00
JC Brand
d2074afe9a Document breaking changes to message transformation events 2020-11-25 14:53:27 +01:00
JC Brand
f9650f33be Add support for XEP-0393 message styling
Fixes #1083

Directives are rendered as templates and their bodies are MessageText instances.
We thereby achieve the necessary nesting of directives (and other rich
elements inside directives) by letting each directive
body render itself similarly to how the whole message body is rendered.
2020-11-24 16:06:48 +01:00
JC Brand
357b6406e2 Postrelease 2020-11-23 10:29:42 +01:00
JC Brand
db1905fdb6 Release 7.0.2 2020-11-23 10:18:35 +01:00
JC Brand
1b50696ca7 Make sure all necessary files are included in the NPM package 2020-11-19 13:12:13 +01:00
JC Brand
a70e82c82b Mention new translations in changelog 2020-11-19 11:44:35 +01:00
JC Brand
4520a04be9 Postrelease 2020-11-19 11:37:56 +01:00
JC Brand
85375842a8 Release 7.0.1 2020-11-19 11:23:04 +01:00
Christoph Scholz
e0088a45da fix emoji-picker for use_system_emojis==false 2020-11-18 17:22:14 +01:00
JC Brand
76aa1ef3ec make postrelease 2020-11-18 13:07:51 +01:00
JC Brand
357cad8a49 Release 7.0.0 2020-11-18 12:10:32 +01:00
Dele Olajide
9f548ae8de
fix #1250 (#2323)
Fixes #1250 Change favicon color when unread messages
2020-11-02 09:10:07 +01:00
Dele Olajide
285bbbc2f1
fix #2321 (#2322)
When Converse runs inside a browser extension, enable browser sync and local storage for persistent storage
2020-10-30 12:51:55 +01:00
Xavi
15f5b185c3
Fix message reorder issue after edit (#2300)
* keep message in place after edition by assigning previous message original timestamp
* update time displayed to keep current behaviour
* add test to check a message remains in the same position of the history after being edited
* briefly describe pr changes in changelog
2020-10-23 15:07:56 +02:00
Xavi
5a4fbe12a9
Allow getHats method to be overriden (#2308) 2020-10-23 14:09:30 +02:00
Dele Olajide
03919b9777 Force CI rebuild 2020-10-23 13:55:28 +02:00
Dele Olajide
81f0cb49bb fix #2307 - BootstrapModal no more accessible to plugins 2020-10-23 13:55:28 +02:00
Dele Olajide
646542602f fix #2304 - Custom emojis (stickers) images not shown 2020-10-21 11:01:08 +02:00
JC Brand
19dc66900d Split the trusted setting into two new ones:
- `allow_user_trust_override`
- `clear_cache_on_logout`

The `persistent_store` setting can now also be set to `sessionStorage`

The `trusted` settings was in effect playing the role of two separate settings
and implicitly affecting a third ('persistent_store').

By breaking it up, we make things more explicit and allow for new
configurations. For example, clearing the cache on logout, while using
some kind of persistent store.
2020-10-20 11:29:03 +02:00
Xavi
042aa3a73e
Create hats from vcard conditionally (#2285)
* allow the use of MUC affiliation, MUC role, and VCard roles as hats
* update setting documentation
* remove filter from VCard roles
* update naming and documentation to make explicit the use of XEP-317 Hats
* include muc_hats config option update to changelog
2020-10-15 09:51:19 +02:00
Koen Van den Wijngaert
15aef10d5d
#2092 fixes room list update loop with locked muc domains (#2268)
* Only update the room list after shown.bs.modal
* add changes to CHANGES.md
* Move shown listener to initialize
2020-10-07 10:37:35 +02:00
bernard ng
efd4e50378
Fix #2231 add sort by query (#2234)
Use of lowercase letters and Infinity to avoid calculation errors when the index is -1
2020-10-01 12:06:35 +02:00
JC Brand
b5783c0668 Refactor converse-api.query and the RSM class
- The `converse.api.query` method now no longer accepts an RSM instance.
- The RSM class now separates `query` parameters from `result` attributes
- Improve JSDoc docs and remove need to make `converse-rsm` a plugin
- Add typedefs for the options expected by RSM and `api.archive.query`
2020-09-30 18:51:21 +02:00
JC Brand
3fc6f7fa23 Fixes #1924 2020-09-25 18:46:45 +02:00
JC Brand
78f8f73fea Get rid of converse-uniview plugin
Instead of overriding createChatBox, set 'hidden' flag via defaults
2020-09-21 18:08:48 +02:00
JC Brand
a0ae8135ce Fixes #1481
For OMEMO in MUC, use the real JID of the user, not the MUC JID
2020-09-17 17:12:06 +02:00
Ariel Fuggini
fce337e352 New configuration setting: notify_nicknames_without_references 2020-09-09 13:11:45 +02:00
Christoph Scholz
6319f566dd fix emojis in case use_system_emojis == false 2020-09-05 11:33:25 +02:00
JC Brand
c3d8f12050 Make api.user.status API methods async
So that `_converse.xmppstatus` is defined before trying to set the
status.
2020-09-04 13:13:07 +02:00
Christoph Scholz
4d9d391365 add CustomElement to env 2020-08-31 17:03:23 +02:00
Christoph Scholz
823134d762 add html to converse.env 2020-08-24 23:48:24 +02:00
Xavi Ferrer
fa3a825549 add changes introduced 2020-08-24 11:46:24 +02:00
Xavi
7cdc592ed9
merge only relevant settings when calling api.settings.extend (#2187)
* merge only relevant settings when calling api.settings.extend
* test behaviour is the one expected and change doesn't break previous tests
2020-08-12 10:12:10 +02:00
Guus der Kinderen
0c5f0e247b Removed the mockups from the project. Recommended to use tests instead. 2020-06-29 16:47:36 +02:00
Kim Alvefur
1062fbdd6b Fix #2101: Improve contrast of text in control box 2020-06-26 17:30:36 +02:00
JC Brand
cf258f0b4c Add new public API method converse.insertInto 2020-06-10 12:42:46 +02:00
JC Brand
7b0e9df41e New config option: show_message_avatar 2020-06-04 14:27:51 +02:00
JC Brand
830e060568 Rename api.settings.update to api.settings.extend
This is to try and make it clearer that this method won't override
initialization settings, and is instead simply to add to the default
settings.
2020-06-03 09:32:16 +02:00
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