Commit Graph

2740 Commits

Author SHA1 Message Date
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
Emmanuel Gil Peyrot
a83911d67f WIP: Move the nickname selection form to a modal 2019-11-28 15:45:48 +01:00
JC Brand
c836eb401f disco: Import individual lodash methods 2019-11-26 22:04:50 +01:00
JC Brand
762717dd38 Bugfix. streamFeaturesAdded triggered too soon.
`streamFeaturesAdded` should only be triggered once we've received them
from the server.

This appears to be a timing bug, likely introduced by the IndexedDB
refactoring.
2019-11-26 22:04:50 +01:00
JC Brand
e23c7ce543 More retraction updates
- Retracted moderated message are not editable
- Use "removed" for user-facing text
2019-11-26 22:04:38 +01:00
JC Brand
13ffe5a667 Various smaller retraction related fixes and improvements 2019-11-26 12:16:48 +01:00
JC Brand
53df5d6b49 Fix whitelisting and dependencies on the headline plugins 2019-11-22 14:38:09 +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
2eff75b387 Don't show retraction button on already retracted messages 2019-11-22 13:50:36 +01:00
JC Brand
2e3cc12d9a Bugfix. Only remove modals when disconnected
not while tearing down, otherwise the modals get removed while
reconnecting and we have stale references to modals no longer in the
DOM.
2019-11-22 13:50:36 +01:00
JC Brand
025cdbf18f Check for support before allowing message moderation 2019-11-22 13:50:36 +01:00
JC Brand
ad77ba60e6 Only show larger text for up to 3 emojis 2019-11-22 13:50:36 +01:00
JC Brand
1b9ba58aca Rename variable to be more accurate 2019-11-22 13:50:36 +01:00
JC Brand
99f539b3cb MUC: Don't show duplicate subsequent info messages 2019-11-22 13:50:36 +01:00
JC Brand
3d4bad4b19 Don't mark info messages as followups 2019-11-22 13:50:36 +01:00
JC Brand
657dd1e6d1 Add /close command for chats 2019-11-22 13:50:36 +01:00
JC Brand
16c83877d2 Bugfix. Re-instantiate confirmation promise 2019-11-22 13:50:36 +01:00
JC Brand
d895c7fc16 Bugfix. Leave space between classes 2019-11-22 13:50:36 +01:00
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