Commit Graph

2721 Commits

Author SHA1 Message Date
JC Brand
149fcf5d32 Properly wait when clearing messages 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
4b3d427cff muc: only create view once model has finished initialization 2019-11-22 13:50:36 +01:00
JC Brand
9965a93291 muc: Simplify getVCardForChatroomOccupant method 2019-11-22 13:50:36 +01:00
JC Brand
e915321e33 Group MUC utility methods in muc_utils object
as opposed to having them in the `u` object
2019-11-22 13:50:36 +01:00
JC Brand
8523cae8d0 Move message parsing code out of ChatBox into new stanza-utils plugin 2019-11-22 13:50:36 +01:00
JC Brand
caadb24310 Refactor logging out into its own module
So that we don't need to `_converse` obj in order to log messages
2019-11-22 13:50:36 +01:00
JC Brand
e7661b725e Updates #1760: Private messages no longer received after websocket reconnect 2019-11-18 22:01:02 +01:00
JC Brand
88ea9f8b61 Match a message of only emojis (instead of just a single emoji) 2019-11-18 12:51:18 +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
5ede164e8d Disable custom emojis for now
Fixes #1769
2019-11-09 11:53:53 +01:00
JC Brand
530e29810d Bugfix. Clicking emoji category twice closes picker and inserts null 2019-11-04 18:25:25 +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
17dfa3d7ba Avoid race-condition that destroys vcards
VCards were being created before `fetch` was completed, so once fetch
was done those VCards were unset from their collection.

Add a new event and promise `VCardsInitialized` that triggers after
successful fetching and wait for it before creating VCards.
2019-10-30 13:02:23 +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
b71500104b Move emoji-picker out so that its width can expand 2019-10-29 17:19:33 +01:00
JC Brand
9934fa7191 New event minimizedChatViewInitialized 2019-10-22 18:33:56 +02: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
aae7e111eb Fix roster caching and versioning issue.
- Always try to first get local cache before requesting the roster.
- Rename `roster_fetched` with `roster_cached`
2019-10-17 16:19:14 +02:00
JC Brand
015f1c6fc8 Make status clickable instead of adding pencil icon 2019-10-17 13:33:43 +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
2ed8b4660e Bugfix. Duplicate rooms-list header 2019-10-16 12:11:59 +02:00
JC Brand
99805d2510 Make sure the roster is fetched again if stream resumption fails 2019-10-15 14:30:04 +02:00
JC Brand
9d619820f9 core: Don't allow the connection to be passed in.
This was used for tests but is no longer necessary.
2019-10-15 14:30:04 +02:00
JC Brand
be03b30d75 bookmarks: better handling of timeouts
- Inform the user when fetching of bookmarks times out.
- Only set the cached flag if the user doesn't have bookmarks.
2019-10-15 13:09:34 +02:00
JC Brand
487f1b5281 core: use _.get since connection might not be set up yet 2019-10-15 13:09:34 +02:00
JC Brand
f21abc60f5 roster: Only fetch from browser storage if already cached 2019-10-15 13:09:34 +02:00
JC Brand
358187f8b0 bosh: Bugfix, pass in JID 2019-10-14 13:22:34 +02:00
JC Brand
0fa95ccd50 Bugfix. Pass correct arguments to synchronous event handlers 2019-10-13 19:58:00 +02:00
JC Brand
50b77e8608 Fixes #1733 2019-10-13 19:48:39 +02:00
JC Brand
c8b7e8ab99 bookmarks: refactor to use VDOMView instead of OrderedListView 2019-10-13 17:53:57 +02:00
JC Brand
91397125ba roomslist: Refactor to use VDOMView instead of OrderedListView 2019-10-13 16:59:31 +02:00
JC Brand
82bce1e946 Move creation of browserStorage into a separate method
This is in anticipation of the localforage/IndexDB merge
2019-10-11 20:40:31 +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
JC Brand
54e9c51a1a Don't rely on getUniqueId of Strophe.Connection
since we can't assume it's always available.
2019-10-11 17:46:13 +02:00
JC Brand
6253dd52a6 core: let logout return a promise and wait for it in tests 2019-10-11 17:46:13 +02:00
JC Brand
a0bd6dbab6 dragresize: Use _.get for converse.connection 2019-10-11 17:46:13 +02:00
JC Brand
5383d65d5a roster: unregisterPresenceHandler must be wrapped in arrow function 2019-10-11 17:46:13 +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
JC Brand
8e4e918575 Replace lodash methods with built-in ones and add jsdoc strings 2019-10-10 14:43:13 +02:00
Christoph Scholz
2d44144b69 prevent message correction for files 2019-10-10 14:19:34 +02:00
JC Brand
8780f7a128 Fix linting errors (no-unused-vars) 2019-10-09 16:27:58 +02:00
JC Brand
8b1c17c12b chatview: Replace lodash methods with built-in ones 2019-10-08 21:29:43 +02:00
JC Brand
f9b09052eb core: Make sure window.converse is defined before assigning to it. 2019-10-08 16:47:30 +02:00
JC Brand
75c11a2006 emoji-views: Specify dependency on muc-views
Otherwise plugins might be loaded out of order and then event handlers
in this module don't get registered.

Also, bump to dev version number
2019-10-08 16:30:23 +02:00
JC Brand
266fe131a9 Release 5.0.4 2019-10-08 14:22:56 +02:00