JC Brand
d2a35d4ce1
Turn converse-roster
and converse-roster-filter
into Lit elements
2021-07-15 17:26:09 +02:00
JC Brand
8de4671603
Replace more elements that use font icons with svg icons
2021-07-15 16:28:12 +02:00
JC Brand
c209b9e2b9
Bump urijs to 1.19.7
2021-07-15 14:18:51 +02:00
JC Brand
2bcf01f5ab
Use DOMPurify instead of XSS.js
...
Remove exports-loader, which is therefore no longer necessary
2021-07-15 14:16:41 +02:00
JC Brand
3c0a621b47
Bump various dependencies
2021-07-15 11:54:55 +02:00
JC Brand
fe3650d766
Bugfix. XEP-0198 stream management not working when using IndexedDB
...
The issue was that batched writing was incorrectly also being applied
for sessionStorage stores, so when the `active` flag in
`_converse.session` was being set to `false` on window unload, the
change wasn't persisted before the window was unloaded.
This caused a new session to be created upon reload, thereby losing the
SMACKS data.
We already solved this for persistent stores by flushing them, and
doing so for the session stores would also work, but session stores
don't have to be batched in the first place, so we turn that off.
2021-07-08 15:57:06 +02:00
JC Brand
46201613a6
Bump skeletor to 0.0.5
2021-07-08 10:33:35 +02:00
JC Brand
f2aa39e1c3
Identify media URLs during message parsing
2021-07-06 13:35:22 +02:00
JC Brand
b90a435833
Move url related utility methods to @converse/headless
2021-07-05 18:35:58 +02:00
JC Brand
bff714f24c
OMEMO: Include XEP-0380 EME tag in encrypted messages
2021-07-05 18:35:58 +02:00
JC Brand
06460507d4
Don't let message actions drop upwards if...
...
it's the first (or second) message in the history, otherwise it might
appear behind the chat header.
2021-07-05 18:35:58 +02:00
JC Brand
01efb02f9e
Make sure XEP-0363 urls are also OMEMO encrypted
...
by re-using `ChatBox.prototype.sendMessage`.
updates #1182
2021-07-03 00:22:03 +02:00
JC Brand
3d8852950d
Add ability to let dropdown appear at the top, left-aligned
...
And use that for the last message in the chat history, otherwise the
dropdown is obscured.
2021-07-01 15:23:37 +02:00
JC Brand
e675c853f3
Add XEP-0454 support for encrypting files
...
Fixes #1182
2021-07-01 14:35:48 +02:00
JC Brand
6665bef76c
Fix failing tests
...
Handle missing message model (happens during tests)
2021-06-29 16:00:10 +02:00
JC Brand
dff5f485c9
Split out MUC tests
2021-06-29 15:59:49 +02:00
JC Brand
4047d619a1
Remove lodash dependency in tests
2021-06-29 15:59:49 +02:00
JC Brand
956a890b94
Don't reject on error in sendTimedMessage
...
It's the only way I could get a failing test (due to the Jasmine upgrade AFAIK) to pass.
I don't understand why this happens, given that the promise has a
`catch` clause in `retractOwnMessage`, but for some reason the promise
rejection gets caught by Jasmine, causing the test to fail.
2021-06-29 15:59:49 +02:00
JC Brand
767d5ec91d
fix failing test
2021-06-29 15:59:49 +02:00
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
8506646db2
Remove unnecessary event trigger
2021-06-29 12:57:48 +02:00
JC Brand
be329a2d10
Don't subclass the chatbox for the controlbox model
2021-06-29 12:55:29 +02:00
JC Brand
73989e09a9
Fixes concerning dropdowns
2021-06-29 11:33:24 +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
18f883545b
Remove duplicate method
2021-06-25 18:19:01 +02:00
ubermanu
524e14f464
Register the document events once the picker is connected
2021-06-25 17:29:06 +02:00
ubermanu
7503de27c5
Remove document event listener once the dropdown is disconnected
2021-06-25 17:29:06 +02:00
JC Brand
14020125b9
Remove sinon and bump npm
2021-06-25 11:21:17 +02:00
JC Brand
0f82b76c09
fix failing test due to i18n string change
2021-06-25 10:59:13 +02:00
dhruva dhruva
f9a2719507
Translated using Weblate (Romanian)
...
Currently translated at 43.7% (223 of 510 strings)
Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/ro/
2021-06-25 10:43:37 +02:00
juliojulian
0b00d4f9e1
Translated using Weblate (Spanish)
...
Currently translated at 90.7% (463 of 510 strings)
Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/es/
2021-06-25 10:43:37 +02:00
Luna Jernberg
aa80093665
Translated using Weblate (Swedish)
...
Currently translated at 99.6% (509 of 511 strings)
Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/sv/
2021-06-25 10:43:33 +02:00
G
778121010f
Translated using Weblate (Polish)
...
Currently translated at 92.7% (473 of 510 strings)
Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/pl/
2021-06-25 10:43:07 +02:00
lilim
a5c391a6a3
Translated using Weblate (French)
...
Currently translated at 100.0% (510 of 510 strings)
Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/fr/
2021-06-25 10:43:07 +02:00
ssantos
f846cb1b20
Translated using Weblate (Portuguese)
...
Currently translated at 100.0% (510 of 510 strings)
Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/pt/
2021-06-25 10:43:07 +02:00
bashl
789d3438e3
Translated using Weblate (Portuguese (Brazil))
...
Currently translated at 98.8% (504 of 510 strings)
Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/pt_BR/
2021-06-25 10:43:07 +02:00
Xosé M
f6de5247d6
Translated using Weblate (Galician)
...
Currently translated at 100.0% (510 of 510 strings)
Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/gl/
2021-06-25 10:43:07 +02:00
member7me
c80d65cf60
Translated using Weblate (Russian)
...
Currently translated at 100.0% (510 of 510 strings)
Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/ru/
2021-06-25 10:43:07 +02:00
Oğuz Ersen
cba44998b9
Translated using Weblate (Turkish)
...
Currently translated at 100.0% (510 of 510 strings)
Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/tr/
2021-06-25 10:43:07 +02:00
JC Brand
ba0ea6c2c4
Update translations based on suggestions from Zash on weblate
2021-06-25 10:38:38 +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
c5de9dd9f1
Render embedded media with full width in overlayed view mode
2021-06-24 16:13:02 +02:00
JC Brand
92093d6d28
Further style tweaks for embedded media
2021-06-24 13:04:25 +02:00
JC Brand
670f435c64
Set max widths with embedded audio and video content
2021-06-24 12:51:02 +02:00
JC Brand
846dfd6762
Allow subdomains to be passed for domain whitelists
2021-06-24 12:36:51 +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
9e21813251
Move tests into new file
2021-06-23 17:11:13 +02:00
JC Brand
3d3242c00d
Bugfix. Images automatically load in modal
2021-06-23 13:24:05 +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
958d98a1a1
Use mock method in test
2021-06-22 17:04:27 +02:00
JC Brand
fb6bafdf6c
Styling: Fix an offset bug
...
That caused empty inline code hints to be considered valid.
Also update the tests that were failing due to the changes in the
previous commit.
2021-06-22 16:54:05 +02:00
JC Brand
6dea5959cc
Use API to get chat/room models in components
2021-06-22 14:47:35 +02:00
JC Brand
afd737f965
Fixes #2520
2021-06-22 12:50:50 +02:00
JC Brand
8de6e78729
In converse-muc-chatarea
, use API to get room
...
and handle asynchronicity.
2021-06-18 11:56:35 +02:00
JC Brand
be8a47b672
Avoid rendering borders for empty unfurl
2021-06-18 11:37:33 +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
f598b7d267
Fix function not being exported
2021-06-17 16:32:58 +02:00
JC Brand
619fb538d7
Show video download URL
2021-06-17 15:50:10 +02:00
JC Brand
095d9b60cd
Render audio from URLs in messages
2021-06-17 15:24:25 +02:00
JC Brand
33b426c79e
Render videos from URLs in messages
2021-06-17 14:06:18 +02:00
JC Brand
2ac49fb9a5
Bugfix. Images being rendered when they shouldn't
2021-06-17 14:06:18 +02:00
JC Brand
b071a0e22f
MAM: Prevent multiple simultaneous queries when scrolling up
2021-06-17 11:39:20 +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
bbc952b265
Fix MUC and headlines heaidngs, so that they still work
...
as ElementViews, since I ran out of time converting them to lit
components as well.
This reverts commit 1121a90af0
.
2021-06-15 11:09:34 +02:00
JC Brand
1121a90af0
Revert "Turn heading into a lit component"
...
This reverts commit 969b2f2e11
.
2021-06-15 10:52:17 +02:00
JC Brand
969b2f2e11
Turn heading into a lit component
2021-06-15 10:33:33 +02:00
JC Brand
8907adc236
Move method to utils
2021-06-15 10:03:10 +02:00
JC Brand
c8304497b5
Remove onStatusMessageChanged handler
...
It's no longer necessary and calls a method that doesn't exist anymore.
2021-06-15 09:59:40 +02:00
JC Brand
68f0be996f
Let chats be closed by calling close
on the models
...
Instead of on the views/components.
We still have `close` methods on the components, but they are just
event handlers and not external API methods to be called by other code.
Instead `close` should be called on the model.
2021-06-15 09:59:40 +02:00
JC Brand
9fb92080f2
Get rid of the APIs to fetch chat views
...
This is largely a leftover from the Backbone.View days and makes less
sense now that the UI is componentized.
Ideally we don't want to call commands on the "views themselves, instead
we should be working on the the models and let the "views" update
themselves automatically.
Also, given that the `jid` attribute on the chat views might change,
especially when rendered declaratively in other frameworks like React,
a view might not be available at times where we previously might have
expected it to be (since it's been repurposed for a different JID).
2021-06-15 09:59:40 +02:00
JC Brand
ba1b712fee
Move functions to utils
2021-06-14 12:03:27 +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
2bbb889196
Unfurls fix
2021-06-10 13:37:11 +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
39d60f05c3
Remove twitter link from homepage. Make navbar more visible
2021-06-10 10:07:19 +02:00
JC Brand
54d6a6af56
Unfurls: gracefully handle missing OGP data
2021-06-09 20:54:08 +02:00
JC Brand
878a3b49a7
Prevent multiple 'New messages' dividers from appearing
...
Would happen when scrolled up and a new message comes in
2021-06-07 19:58:55 +02:00
JC Brand
825e2643ae
Use flex-direction: column-reverse
...
On the `<converse-chat-content>` element. This removes the need for all
the manual scrolling.
Firefox finally supports this feature. Unfortunately Firefox ESR doesn't
yet, but I can't wait anymore.
2021-06-07 19:26:16 +02:00
JC Brand
9bcf5f2947
Scrolling fixes
...
* Remove extra `_markScrolled` function
* Only try to maintain scrolling position when some non-scrolling change has happened.
2021-06-07 17:54:38 +02:00
JC Brand
c966c49304
Fixes #2500
...
This wrongly stored value wasn't inlcuded in the published the bundle
because the libsignal store was used, which had the right value for the public key.
Instead, this value was used locally by being passed to the libsignal
session builder to verify signed prekey.
2021-06-07 13:49:21 +02:00
JC Brand
90dff612c7
Re-initialize chat components when jid attribute changes
2021-06-07 12:53:35 +02:00
JC Brand
9e4a4ba2ff
Add example for retractOtherMessage
2021-06-07 10:10:19 +02:00
JC Brand
e3612e8c62
Turn the chats into Lit components
...
Previously they were of type ElementView from @converse/skeletor
The ElementView component is merely a helper to allow us to eventually
migrate everything to Lit
2021-06-04 15:22:52 +02:00
JC Brand
06c4ded063
Get rid of impperative code to render help messages
...
in 1:1 chat
2021-06-04 13:41:01 +02:00
JC Brand
ff233a5b1c
Merge branch 'jcbrand/declarative-scrolling'
2021-06-04 12:59:52 +02:00
JC Brand
982586b0e6
Move protocol tests to plugin
2021-06-04 12:53:03 +02:00
JC Brand
ae5a13bb06
Move emojis tests into plugins
2021-06-04 12:53:03 +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
623deac3ec
Fix race condition in test
2021-06-03 18:36:26 +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
279a3c3413
Add saveScrollPosition method on ChatContent
2021-06-03 15:32:39 +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
1598640c80
Remove line-breaks from message image markup
...
We use `white-space: pre-wrap` to render the messages, so line-breaks in
the markup add unnecessary space.
2021-06-01 14:56:43 +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
ad53a3c9a1
Message styling fix
...
Don't parse text that falls within XEP-0372 references ranges for
message styling hints.
2021-05-13 11:20:03 +02:00
JC Brand
58b59fe263
Move more tests from spec folder
2021-05-12 12:41:19 +02:00
JC Brand
d71ab6d30d
Bugfix. Need to pass in group name since this
is undefined
2021-05-12 12:26:16 +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
18e3b618b4
Some light chat views refactoring
...
- Move `showModeratorToolsModal` method from view to utils
- Move `getNicknameRequiredTemplate` method from view to utils
- Move common `close` code to base class
2021-05-07 11:23:52 +02:00
JC Brand
fdc81fa4ea
Use .conversejs
instead of .converse-root
...
as the class that designates standalone Converse components.
2021-05-06 12:21:35 +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
d0594a6bfc
Add new test for <converse-muc>
2021-04-30 18:01:53 +02:00
JC Brand
9c11e0dc32
Use .converse-root
class instead of #conversejs
id
2021-04-30 17:36:42 +02:00
JC Brand
4bdafb8ea3
Break Sass up into more files
...
And import where appropriate to allow for custom builds that are still styled properly
2021-04-30 17:36:40 +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
1f7fecab21
Make show_images
a prop of converse-chat-mesage-body
...
That way, when the setting changes and we call `requestUpdate` on
`converse-chat-message`, the body will rerender.
2021-04-26 12:08:16 +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
8e0701f7bb
Fix TypeError
...
The view isn't yet defined when we call `maybeFocus`. This is in any case
not the right place to call something like this.
2021-04-23 11:49:45 +02:00
JC Brand
a5d428c42d
Fix closing MUC from rooms list
...
View isn't defined if chat is in background
2021-04-23 11:42:30 +02:00
JC Brand
b2445d36d1
Bugfix. pretty_time
was undefined
2021-04-23 10:59:50 +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
b678df8d23
Move tests file to plugin folder
2021-04-22 14:41:17 +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