Commit Graph

436 Commits

Author SHA1 Message Date
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