JC Brand
335a491e0d
Stop using the Jasmine "done" callback
2021-06-29 15:59:49 +02:00
JC Brand
3e9f028bf4
Update more 3rd party deps
2021-06-29 13:00:36 +02:00
JC Brand
be329a2d10
Don't subclass the chatbox for the controlbox model
2021-06-29 12:55:29 +02:00
JC Brand
46f567d0d1
Fix memory leak in sessionStorage
...
The disco entities collection gets recreated and repopulated every time
the connection is re-established or after the user logs in again after
having logged out.
The old disco entities weren't being removed, due to an erroneous
`shouldClearCache` call (not applicable to sessionStorage data).
In addition we need a handler to fire and clear the entities cache when
Converse is going to restart.
2021-06-29 11:20:50 +02:00
JC Brand
14020125b9
Remove sinon and bump npm
2021-06-25 11:21:17 +02:00
JC Brand
7848d8cb2f
Add support for decrypting XEP-0454 OMEMO media
2021-06-25 09:24:18 +02:00
JC Brand
2c0fbec43c
Move arraybuffer utility methods into their own file
2021-06-24 18:57:32 +02:00
JC Brand
e00bf3da36
Make sure unread messages are cleared when showing a chat
2021-06-23 17:18:32 +02:00
JC Brand
522998bade
converse-roster: dedupe group names
2021-06-23 12:02:47 +02:00
JC Brand
629f382642
converse-roster: Move functions to utils
2021-06-23 12:02:47 +02:00
JC Brand
ad96db994e
Fix failing tests on Travis
2021-06-23 10:52:32 +02:00
JC Brand
cf11f2588c
Rename method
2021-06-18 11:35:38 +02:00
JC Brand
bb60f8cff4
Move trigger out of while loop
2021-06-18 10:21:03 +02:00
JC Brand
42b15497fc
New event historyPruned
2021-06-18 10:07:30 +02:00
JC Brand
b6f2662ad7
Set 'scrolled'
flag on model.ui
...
This prevents it from being persisted across page loads and makes more
sense logically.
Also move markScrolled to utils and MUC unread messages indicator to bottom panel.
2021-06-17 11:39:20 +02:00
JC Brand
5ea9564cc3
Add new configuration setting prune_messages_above
...
If set to a positive integer, the chat history will be kept to that size
by removing older messages.
This happens as new messages come in (as long as the chat isn't scrolled up)
and when the user scrolls down.
Also add the `pruning_behavior` setting
2021-06-17 11:39:20 +02:00
JC Brand
85a651ae79
Move functions to utils
2021-06-17 11:35:06 +02:00
JC Brand
dc711d494f
Add a placeholder to indicate a gap in the message history
...
The user can click the placeholder to fill in the gap.
2021-06-17 11:35:06 +02:00
JC Brand
14f0ed43c5
Add dayjs as dependency to @converse/headless
2021-06-16 14:47:34 +02:00
JC Brand
6f318bc86d
Fix reference error
2021-06-16 14:47:34 +02:00
JC Brand
543cf9066a
Bugfix. TypeError: cannot read property 'length' of undefined
2021-06-14 10:50:58 +02:00
JC Brand
bccd4a81b8
Add missing test file
2021-06-11 16:55:37 +02:00
JC Brand
17d9d2766d
BUgfix. undefined
used as store prefix
2021-06-11 16:53:19 +02:00
JC Brand
ff1b6d3adf
MUC: Don't first check if we're registered before unregistering
...
The IQ stanza being sent to check was in any case incorrect and it
doesn't seem necessary.
2021-06-10 10:40:45 +02:00
JC Brand
9e4a4ba2ff
Add example for retractOtherMessage
2021-06-07 10:10:19 +02:00
JC Brand
ff233a5b1c
Merge branch 'jcbrand/declarative-scrolling'
2021-06-04 12:59:52 +02:00
JC Brand
f3efbba26c
Create converse-message-form
component
...
More work on making bottom panel sub-components declarative
- Handle auto-completion in the converse-muc-message-form element
- Make message limit indicator a component
- Rename template
2021-06-04 12:53:03 +02:00
ubermanu
2f7dcb6bbc
Move decodeHTMLEntities util into headless
2021-06-03 19:23:49 +02:00
JC Brand
58d96c8594
Use intersection observer to remember scrolling position
2021-06-03 18:24:55 +02:00
Christoph Scholz
8701708b53
fix /nick command not working
2021-06-03 17:29:45 +02:00
JC Brand
fe3e63d8c5
Declarative scrolling and rendering new messages indicator
...
- Increment `num_unread` when new messages appear while scrolled up
- Set scrolling state in model code (as opposed to view)
2021-06-03 14:16:03 +02:00
JC Brand
ec93e2fff3
Render chat messages loading spinner declaratively
...
instead of imperatively.
Add new non-persisted UI model for rendering UI changes. Currently only
being used for rendering the spinner
2021-06-03 00:02:33 +02:00
JC Brand
59d55b3526
Add option to deregister nickname when closing a MUC
...
By setting `auto_register_muc_nickname` to `'unregister'`
2021-06-02 22:06:57 +02:00
JC Brand
0756af2b30
Refactor chat close
methods
...
- Remove the shared base-class method.
- Trigger `chatBoxClosed` on the model
- Send CSN from the model, not the view
2021-06-02 17:55:52 +02:00
JC Brand
994e528b45
Bugfix. Properly escape | character in mentioned nicknames
2021-05-19 14:47:20 +02:00
JC Brand
06f03fc884
MUC: Store disconnection data on the session
2021-05-13 15:45:12 +02:00
JC Brand
698f3a7b15
Bugfix. Can't call tagName
on a Strophe.Builder object
2021-05-13 14:41:44 +02:00
JC Brand
c0c8fbac38
Wrongly passed data to the context parameter in hook
...
Causes `undefined` to be returned from `constructPresence` when `converse-caps` is not enabled
2021-05-13 12:15:39 +02:00
JC Brand
19b34231d4
JSDoc improvements
2021-05-13 11:44:19 +02:00
JC Brand
2b12f8e257
Use lodash-es everywhere
2021-05-12 12:14:28 +02:00
JC Brand
9e81fa495e
Upgrade pluggable.js and skeletor
2021-05-12 12:13:10 +02:00
JC Brand
f40bbbf145
Turn status plugin into folder
...
Remove the use of an override and add a hook `presenceConstructed` instead
2021-05-11 17:04:15 +02:00
JC Brand
1fc44b9d8e
Turn caps plugin into folder.
...
Move more test files to plugins
2021-05-11 16:18:34 +02:00
JC Brand
7bd0d9a83f
Bugfix. Don't re-init bookmarks on reconnection
...
This causes an empty bookmarks list in the controlbox, because the
collection gets cleared (and then asynchronousy repopulated) while the
`bookmarksInitialized` promise stays `true` (resulting in a race
condition).
Alternative fix could be to clear the bookmarks and recreate the promise
before reconnecting but doesn't seem necessary to do all that work.
2021-05-07 12:27:29 +02:00
JC Brand
c8f0406c84
Refactor bookmark plugins
...
Mainly moving functions and methods to utils
2021-05-07 12:27:29 +02:00
JC Brand
dd609c1cec
Get the webpack dev server to work again
...
This required triggering the `converse-loaded` event in the entry.js
file, which means it won't be triggered for `@converse/headless` when
used in isolation.
Not ideal, but probably ok because consumers of `@converse/headless`
should probably import it into their own project in any case.
2021-05-06 12:07:44 +02:00
JC Brand
8966290369
Don't make bundled dependencies devDependencies
...
Otherwise you need to manually include them in downstream consumer projects
2021-04-30 14:17:46 +02:00
Shaun Wu
9ea8653ef7
Upgrade to Webpack 3
...
Had to make various other changes due to incompatibilities.
- Use the new `lit` package instead of `lit-html` or `lit-element`
- Drop `haunted` since it breaks the rules by specifying `type: module`
but then doesn't import with file extensions
- Use Sass Dart instead of node-sass (fixes #2445 )
- Upgrade Karma
2021-04-30 13:50:50 +02:00
Shaun Wu
1cb2b1f7a9
Adding configurable url history changing
2021-04-29 11:59:28 +02:00
JC Brand
754f1fcb25
Split smacks plugin up into multiple files
2021-04-28 18:50:54 +02:00
JC Brand
3d58b67517
Use @converse/openpromise
2021-04-28 18:35:08 +02:00
JC Brand
57ccf4c20e
Batched writes to IndexedDB
...
- Update to the latest @converse/skeletor (which uses mergebounce to batch writes)
- Flush storage before logging out
- Flush when reloading the tab
- Create initStorage method
2021-04-28 16:53:50 +02:00
JC Brand
4c804fcf2d
Wait on chatBoxesFetched
in API
...
Otherwise we can run into race conditions when using IndexedDB with
mergebounce
2021-04-28 12:05:40 +02:00
JC Brand
d86f3094b9
Fix failing test
2021-04-23 12:05:30 +02:00
JC Brand
4b737c1c93
Disable interval handler when running tests
2021-04-23 12:00:29 +02:00
JC Brand
ff14a706cf
Fix parameters signature for onDiscoInfoRequest
2021-04-23 11:49:45 +02:00
JC Brand
db12e8a1e6
ping: use setInterval
to continuously send out pings
2021-04-22 16:27:19 +02:00
JC Brand
7b49296a24
Bugfix. Avoid creating an undefined store
2021-04-22 14:47:01 +02:00
JC Brand
a4b90e3ab2
Move tests to headless plugin
2021-04-21 12:25:28 +02:00
JC Brand
458c51b32d
Move tests for message image rendering to new file
2021-04-21 12:06:10 +02:00
JC Brand
6af9142810
Move ping plugin into folder
2021-04-21 11:18:48 +02:00
JC Brand
7b7ec45db8
Move disco plugin into folder and import lodash utilities separately
2021-04-21 11:03:22 +02:00
JC Brand
b2f09f64c3
Use API to get room
2021-04-19 15:23:58 +02:00
JC Brand
fdde708327
Add a new MUC room state: converse.ROOMSTATUS.BANNED
...
This makes it easier to distinguish between being banned from a room, or
being disconnected for other reasons.
2021-04-15 12:34:00 +02:00
JC Brand
b439ae1cc4
Bugfix. Don't set fake nick...
...
when creating occupant from affiliation change stanza.
This means that when a presence for that occupant arrives, a duplicate
occupant is created (presumably because the original can't be find due
to the wrong nick being set).
2021-04-14 18:02:41 +02:00
JC Brand
cd9977c94e
Add an API for setting affiliations
...
This allows us to set affiliations in MUCs without having to first enter
the MUC in order to create a `ChatRoom` instance.
2021-04-14 10:44:31 +02:00
JC Brand
383f5c1d60
Extract affiliation-related methods out of the ChatRoom model
...
and put them together in a utils file
2021-04-14 10:44:31 +02:00
JC Brand
ccd60f76c3
Cleanup
...
- Move top-level functinos to utils files
- Get rid of unused/obsolete overrides
- Only import components there where they're used
- Bump version in package.json
2021-03-26 10:58:51 +01:00
ubermanu
3bfd60a3df
Move the httpToGeoUri util into core
2021-03-25 09:08:39 +01:00
JC Brand
3c99f1f840
Fixes #2348
...
Don't automatically hide the first MUC opened in uni-view
2021-03-22 11:39:17 +01:00
JC Brand
3bdae848b3
Fix this
binding bug
2021-03-19 13:02:56 +01:00
JC Brand
9d5d94a8f4
Update to latest Skeletor with localforage-setitems optimization
2021-03-18 16:21:15 +01:00
JC Brand
05abb1dae9
Move method from view to model
2021-03-17 11:27:13 +01:00
JC Brand
d548180f20
Add support for more languages, 'da', 'sw', 'th'
2021-03-17 10:20:19 +01:00
JC Brand
fff431737b
Add support for new languages 'fa', 'el', 'lt'
2021-03-17 09:41:58 +01:00
JC Brand
dde3ef206d
Update to Strophe with a SASL fix
2021-03-16 15:10:09 +01:00
JC Brand
c7c077074f
Chat: Move two methdos from component to the model
2021-03-16 11:01:10 +01:00
JC Brand
d8daedea0d
Render the MUC view component declaratively
2021-03-15 12:34:56 +01:00
JC Brand
4ca30c4b93
Create converse-muc-chatarea
component
2021-03-11 10:26:09 +01:00
JC Brand
4fd848ff3e
Bugfix. Use init settings to check for test env
2021-03-10 12:39:17 +01:00
JC Brand
d3ab68011a
Split core.js file into multiple smaller ones
...
Update storing of app settings. Store settings in a closured
`app_settings` object inside `@converse/headless/shared/settings`
Remove the `_converse.settings` object.
2021-03-09 14:11:28 +01:00
JC Brand
a24aa1487e
Add mailbox.org as sponsor
2021-03-05 15:28:23 +01:00
JC Brand
541613d1fe
Add more OGP metadata attributes to save
2021-03-04 17:56:24 +01:00
JC Brand
3e5bd34141
Fixes #2381
2021-03-03 22:25:04 +01:00
JC Brand
1bd4572957
Restrict unfurl description to message_limit
setting
2021-03-02 11:03:35 +01:00
JC Brand
8dd8c7d1dd
Don't show unfurl card if there's nothing to show
2021-03-02 11:03:35 +01:00
JC Brand
64fd0ebcf6
Unfurls: Remove URL check
...
Url parameters mean that we don't get a match even when the URLs
actually match.
Could potentially use URI.js but gets cumbersome and since we restrict
to metadata coming from the MUC service (which we trust) I think it's OK
to remove it.
2021-03-02 11:03:35 +01:00
JC Brand
9bac86fe1a
Don't add the same OGP metadata multiple times
2021-03-01 21:31:57 +01:00
JC Brand
16e1f95790
New config setting: muc_show_ogp_unfurls
2021-03-01 14:00:28 +01:00
JC Brand
426bf1d631
Tighten up security around unfurls
...
Dont render OGP metadata:
- for URLs not actually found in the original message
- from MUC participants (only from the MUC itself)
2021-03-01 11:35:12 +01:00
JC Brand
ce1c5ec7f6
Updates #2413
...
Wrap `history.start` in try/catch clause.
2021-02-24 15:48:11 +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
JC Brand
ccfa00d7b8
mod_ogp now sends messages with type="groupchat"
2021-02-23 11:07:00 +01:00
JC Brand
f158a996f4
Turn converse-chatboxes plugin into folder
2021-02-22 21:07:54 +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
9ce4092a7c
Turn the bottom panel into a custom element
2021-02-12 14:32:55 +01:00
JC Brand
8b052e20b9
Fix tests by pinning to latest @converse/skeletor
2021-02-10 16:14:34 +01:00
JC Brand
95c14e5a26
Don't pass chatview object to converse-chat-content
...
and any child components.
This makes it easier to use these components independently of one
another and the overarching view.
2021-02-09 16:40:00 +01:00
JC Brand
790caf9f5a
Render converse-chat-content
declaratively
2021-02-09 15:48:21 +01:00
JC Brand
7abc81f8a4
MUC: Wait until occupants are fetched before updating them
2021-02-09 15:48:21 +01:00