Commit Graph

976 Commits

Author SHA1 Message Date
JC Brand
e5188d8b10 Bugfix. Remove affiliation based on updated members lists 2019-07-04 08:28:12 +02:00
JC Brand
1a3526f537 Update openAndEnterChatRoom to take JID 2019-07-04 08:28:12 +02:00
JC Brand
67bcc00f10 Associate ChatRoomOccupant to ChatRoomMessage
and use promises to indicate when an occupant or contact has been set
2019-07-04 08:28:12 +02:00
JC Brand
3bd8c6dbec Fix failing test on Travis 2019-07-01 18:07:08 +02:00
JC Brand
bb94891621 Only remove non-members when reconnecting to a MUC
to avoid unnecessarily destroying and then recreating ChatRoomOccupant
instances for room members.
2019-07-01 09:16:15 +02:00
JC Brand
615b5b08a2 Fix failing test on Travis 2019-06-28 13:14:40 +02:00
JC Brand
8db839b4cf Send a XEP-0410 ping when we restore a MUC from cache
and re-enter if necessary.

This solves the problem where we "clone" a tab (e.g. middle-click) and
then restore a MUC from cache which we haven't actually entered (given
that the new tab represents a new device and session).

Also... add `await` in a test to try and fix Travis flakiness
2019-06-27 16:50:44 +02:00
JC Brand
98215deb21 Update to latest backbone.overview which debounces sorting on add event 2019-06-27 13:15:55 +02:00
JC Brand
9ee0b68133 Fix failing test 2019-06-26 17:31:53 +02:00
JC Brand
824b2c81b4 converse-minimize: Rename view methods to clarify
that they are in response to a change and not meant as an API.
2019-06-26 16:52:51 +02:00
JC Brand
9430627180 Re-group some message specs 2019-06-26 11:09:07 +02:00
JC Brand
2cbc4aaa50 Fixes #1494. Trim whitespace around messages 2019-06-26 10:59:56 +02:00
JC Brand
c759112cf3 Fix failing test 2019-06-25 22:53:39 +02:00
JC Brand
e83b0ff39e Update wording to clarify what /revoke means 2019-06-25 16:59:00 +02:00
JC Brand
681c3a2c12 Corrections bugfix. Don't save new id on message model
otherwise a new cache entry gets created, causing multiple messages to
be restored from cache later on.
2019-06-25 12:06:47 +02:00
JC Brand
40469a9787 MUC: Refresh room features when re-entering a cached room
Only fetch messages after we have the latest room features
Otherwise we run into race conditions where MAM messages are fetched
before we know whether (updated) the room supports MAM or not.
2019-06-20 14:04:46 +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
7455ce1b07 Fixes #1579 and fixes #1538 2019-06-19 09:24:44 +02:00
JC Brand
9750dcf3a8 Fixes #1142. Show confirmation dialog for editing messages
when the textarea contains an unsent message
2019-06-19 08:43:42 +02:00
JC Brand
4f67f352f5 Fix /${command} parsing bug 2019-06-18 13:01:38 +02:00
JC Brand
1879c18cd2 Trying to fix failing test on travis 2019-06-18 12:05:40 +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
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
eeab6e4fca Fix failing test 2019-06-13 17:12:37 +02:00
JC Brand
0e81234f73 Fix failing tests 2019-06-13 14:17:51 +02:00
JC Brand
ba9d28b5c2 Two MUC tests
- Test for info message indicating a configuration change
- Test that the MUC reconnects when a `not-acceptable` error is returned
2019-06-12 18:39:24 +02:00
JC Brand
bbe2a62295 converse-muc: Create info and error messages on the model
instead of on the view.
2019-06-12 06:27:07 +02:00
JC Brand
a7184fab41 Bugfix. Need to wait for setUserJID 2019-06-05 11:38:14 +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
1d9bbb8ddd Message display improvements
* Checkmark and edit modal button are now on the right
* Instead of showing checkmarks for MUC messages,
  we now show them as light grey before MUC reflection
* Simplify message markup by requiring less `if` statements
2019-06-04 11:12:22 +02:00
JC Brand
737e27c726 Use shakespearean character names in tests 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
e362776b9f converse-muc-views: Don't prematurely insert MUC into the DOM 2019-05-31 09:14:42 +02:00
JC Brand
aece956281 Refactor strophe usage
- Upgrade to latest commit in Strophe
- Import individual Strophe dependencies
- Replace strophe plugins with code in Converse
2019-05-29 18:27:34 +02:00
JC Brand
7a18f59f8f Simplify rendering of trimmed chats
Also fix issue where trimmed headline chatboxes don't show the proper
color
2019-05-29 13:28:45 +02:00
JC Brand
da713f3162 Improve chatroom name rendering
- Take locked_muc_domain into consideration in chatroom display name
- Use getDisplayName when rendering the heading name
- Give preference to bookmark name if it exists
2019-05-29 13:27:41 +02:00
JC Brand
e053b97043 Set room `connection_status' to DISCONNECTED...
when receiving an `unavailable` presence for ourselves.
2019-05-28 14:30:55 +02:00
JC Brand
fcc9e8c31b Also allow @ in moderator commands 2019-05-27 12:27:24 +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
5e6c2b9982 Move role modifying method to the model
and also first check whether we have an occupant with that nickname.

Since roles are session based, it doesn't make any sense to try to
modify the role for a user not in the room.
2019-05-27 12:27:03 +02:00
JC Brand
e1762a1bb5 Rename key event handler methods to avoid confusion 2019-05-26 11:09:43 +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
463bc02dd5 Cheat to get two failing test to pass on Travis
Since recently these tests have been failing consistently on Travis,
even though they're passing locally.

Ran out of time debugging the issue, so disabling some stuff for now.
2019-05-24 09:06:24 +02:00
JC Brand
f0a680e492 Remove animate config settings.
Also update tests
2019-05-23 22:02:08 +02:00
JC Brand
99f2cecbed Trying to fix failng test on Travis 2019-05-23 15:06:53 +02:00
JC Brand
77734d5fc9 Improve test to also check stanza traffic 2019-05-23 14:44:10 +02:00
JC Brand
429c320a79 Also clear MUC occupants upon reconnection 2019-05-22 19:27:53 +02:00
JC Brand
79b6a557ed Use async/await and hopefully fix some failing Travis tests 2019-05-22 16:13:15 +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
9cb9151265 Add test to check that #1577 is resolved 2019-05-21 12:05:47 +02:00