JC Brand
24ddbefb63
Pass model's whole JSON to nickname form
...
Not strictly necessary for vanilla Converse, but makes life easier
downstream
2020-10-01 16:29:44 +02:00
JC Brand
8ef3b10d39
Don't hide chats when singleton
is true
2020-10-01 13:43:42 +02:00
JC Brand
6d9752645f
Replace lodash methods with native ones
...
filter
find
has
isEmpty
isString
isUndefined
noop
reject
uniq
2020-10-01 12:56:00 +02:00
bernard ng
efd4e50378
Fix #2231 add sort by query ( #2234 )
...
Use of lowercase letters and Infinity to avoid calculation errors when the index is -1
2020-10-01 12:06:35 +02:00
JC Brand
e761923cc9
Bump @converse/skeletor and localForage
2020-09-30 18:51:21 +02:00
JC Brand
ccd9146c6c
Bugfixes. Fix order of parameters and don't render undefined
2020-09-30 18:51:21 +02:00
JC Brand
02a9126ab6
Log errors when failing to save a message to storage
2020-09-30 18:51:21 +02:00
JC Brand
b5783c0668
Refactor converse-api.query
and the RSM class
...
- The `converse.api.query` method now no longer accepts an RSM instance.
- The RSM class now separates `query` parameters from `result` attributes
- Improve JSDoc docs and remove need to make `converse-rsm` a plugin
- Add typedefs for the options expected by RSM and `api.archive.query`
2020-09-30 18:51:21 +02:00
Christoph Scholz
e7a3bb87c6
Update pot and po files
2020-09-30 10:59:39 +02:00
Christoph Scholz
ff5a046922
Revert "fix i18n of label group name"
...
This reverts commit 5a874a4956
.
2020-09-30 10:59:39 +02:00
Christoph Scholz
5ea2ccfc17
fixes #2238 i18n not working reliably
2020-09-28 13:31:19 +02:00
Kim Alvefur
76b488a672
Bugfix. Promise.resolve is not a constructor
2020-09-28 10:49:14 +02:00
JC Brand
65ad33ec81
Let message component listen for changes...
...
and render directly from those
Instead of doing it higher up in the chat view (which requires more
function calls and iterating through all messages).
2020-09-27 10:31:53 +02:00
JC Brand
4ebd3caf48
element: Call super.disconnectedCallback
2020-09-27 10:31:53 +02:00
JC Brand
904a1394eb
Always render avatar via lit-html
...
Fixes #2244 by checking if image already is in the `data:` format.
2020-09-27 10:31:53 +02:00
JC Brand
5dac2d8873
muc-views: Use lit-html instead of lodash templates
2020-09-27 10:31:32 +02:00
JC Brand
889f4d4e15
Always render spinner via lit-html
2020-09-26 10:04:33 +02:00
JC Brand
0ca2e5ae08
Remove need for lodash templates in headless build
2020-09-26 09:58:34 +02:00
JC Brand
3fc6f7fa23
Fixes #1924
2020-09-25 18:46:45 +02:00
JC Brand
3a88831b9d
Bugfix. MUC tries multiple times to register nick
2020-09-25 15:30:53 +02:00
JC Brand
5350cb107f
Don't throw timeout errors for sent IQ#result or IQ#error stanzas
2020-09-25 14:12:12 +02:00
JC Brand
e82d6785c2
Update pot and po files
2020-09-24 09:02:58 +02:00
Emmanuel Gil Peyrot
fff9eeaa5c
Translated using Weblate (French)
...
Currently translated at 99.6% (500 of 502 strings)
Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/fr/
2020-09-21 18:15:57 +02:00
zilliu
a436f9e117
Translated using Weblate (Chinese (Traditional))
...
Currently translated at 99.2% (498 of 502 strings)
Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/zh_Hant/
2020-09-21 18:15:57 +02:00
Nikolaj Nielsen
e7606d133d
Translated using Weblate (Danish)
...
Currently translated at 0.1% (1 of 502 strings)
Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/da/
2020-09-21 18:15:57 +02:00
Georgi Bachev
cd7817126e
Added translation using Weblate (Danish)
2020-09-21 18:15:57 +02:00
aevw
8aeaa54ba4
Translated using Weblate (Portuguese (Brazil))
...
Currently translated at 100.0% (502 of 502 strings)
Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/pt_BR/
2020-09-21 18:15:57 +02:00
random r
9733d572de
Translated using Weblate (Italian)
...
Currently translated at 100.0% (502 of 502 strings)
Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/it/
2020-09-21 18:15:57 +02:00
Xosé M
1d83c3b852
Translated using Weblate (Galician)
...
Currently translated at 100.0% (502 of 502 strings)
Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/gl/
2020-09-21 18:15:57 +02:00
nautilusx
d42aa4d3c6
Translated using Weblate (German)
...
Currently translated at 99.2% (498 of 502 strings)
Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/de/
2020-09-21 18:15:57 +02:00
JC Brand
78f8f73fea
Get rid of converse-uniview
plugin
...
Instead of overriding createChatBox, set 'hidden' flag via defaults
2020-09-21 18:08:48 +02:00
JC Brand
f79fd33302
Chat views: listen whether hidden
gets set and show/hide
2020-09-21 18:08:48 +02:00
Christoph Scholz
5a874a4956
fix i18n of label group name
2020-09-18 21:13:08 +02:00
JC Brand
b17e7cd55b
Fix rendering of SVG avatars
2020-09-18 15:09:55 +02:00
JC Brand
0a7dff442c
Fixes #2235
2020-09-18 15:09:55 +02:00
JC Brand
7330530d13
omemo: better error handling when some bundles can't be fetched
2020-09-18 15:09:55 +02:00
JC Brand
3af1ffc357
omemo: announce bundle info after publishing new device
2020-09-18 15:09:55 +02:00
JC Brand
32847e860f
pubsub: await IQ response when publishing
2020-09-18 15:09:23 +02:00
JC Brand
5949d29460
omemo: specify pubsub item id of 'current'
2020-09-18 15:09:23 +02:00
JC Brand
2e393d260b
Update to @converse/skeletor 0.0.2
2020-09-18 11:34:14 +02:00
JC Brand
5162f3f674
connection: Fix typo
...
This fixes anonymous logins
2020-09-18 11:34:03 +02:00
JC Brand
dd155220f0
Use declarative autofocus for login form
2020-09-18 11:33:24 +02:00
JC Brand
a0ae8135ce
Fixes #1481
...
For OMEMO in MUC, use the real JID of the user, not the MUC JID
2020-09-17 17:12:06 +02:00
JC Brand
a72ad8a53d
autocomplete: store query string on Suggestion instance
2020-09-17 14:55:52 +02:00
JC Brand
bbf4c08ffd
Prevent emoji from being inserted twice
2020-09-17 13:50:52 +02:00
JC Brand
ccbf049000
emoji: raise an error if getShortnameReferences
is called too soon
2020-09-17 12:24:18 +02:00
JC Brand
49cda74971
Update package-lock
2020-09-17 10:42:57 +02:00
JC Brand
7f2ba663d5
autocomplete: Use Array functions
2020-09-17 10:37:09 +02:00
JC Brand
0a82a177c4
OMEMO: ensure reflected encrypted MUC messages are identified
2020-09-17 10:37:09 +02:00
JC Brand
9fe7bfcd64
Include chatbox
in 'message' event data
2020-09-16 19:08:56 +02:00
dependabot[bot]
522e7706c1
Bump lodash from 4.17.15 to 4.17.19
...
Bumps [lodash](https://github.com/lodash/lodash ) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases )
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-09-15 15:43:41 +02:00
JC Brand
8d3cd687e7
Pass chatbox or _converse as context
2020-09-11 16:44:28 +02:00
JC Brand
bbcfc9f998
Bugfix. 2nd parameter for api.hook
is the context
2020-09-11 16:23:51 +02:00
JC Brand
71cfc7aba1
Bugfix. Include model when manually triggering change event
2020-09-11 16:01:15 +02:00
JC Brand
c0fc3c38f3
Bump to strophe 1.4 and add sprintf
2020-09-10 14:08:43 +02:00
JC Brand
543a29bcce
Fixes #2116
2020-09-10 11:08:27 +02:00
JC Brand
527c14b194
Fixes #2133
2020-09-10 10:51:57 +02:00
JC Brand
0e03640ebe
Fixes #2195
2020-09-10 10:17:13 +02:00
JC Brand
5d8e5468ba
Refactor converse-notifications to used parsed message attributes
...
instead of querying the stanza.
Also fixes a bug where typing notifications triggered an AttributeError
inside `shouldNotifyOfGroupMessage`
2020-09-10 10:10:59 +02:00
JC Brand
1873003624
Add new plugin converse-carbons
...
Fixes a bug whereby carbons weren't being enabled because the listener
for `afterResourceBinding` was registered before `converse.initialize`
was called,(which means it was removed as soon as `cleanup` was called
inside `converse.initialize`).
This shows that event `api.listen` API calls can/should only be called
inside the `initialize` method of a plugin (or at least once plugins
have been initialized).
2020-09-10 09:27:27 +02:00
JC Brand
2c042cc3fa
Fixes #2184 : Headless build relies on locale directory
...
Removed Jed from the headless build and instead let `__` call sprintf.
It's now up to downstream users for `@converse/headless` to decide
whether they want i18n support for the few translatable strings in that package
and to implement it themselves.
2020-09-10 08:55:38 +02:00
JC Brand
89d5c872b3
Don't mark messages as read when received in a hidden MUC
2020-09-09 16:23:53 +02:00
JC Brand
ffbab33a26
Create own occupant before setting connection_status
to ENTERED
...
This makes it possible to wait for the connection_status before trying
to call `getOwnOccupant` in plugins
2020-09-09 15:33:50 +02:00
JC Brand
b7654f1fc7
Move some View declarations out of the plugin initialize
method
...
Precursor to some refactoring planned
2020-09-09 15:02:40 +02:00
JC Brand
7c43d0435c
Refactor OMEMO.
...
- Add hooks to the stanza parsers so that plugins can do additional parsing.
- Change ChatBox instance methods to functions and use them for stanza parsing.
- Move encrypt and decrypt messages to `converse.env.omemo`
Apparently, when receving a 1:1 carbon message, a device was wrongly created
for the contact's device list, instead of our own.
2020-09-09 14:04:24 +02:00
Ariel Fuggini
fce337e352
New configuration setting: notify_nicknames_without_references
2020-09-09 13:11:45 +02:00
Xavi Ferrer
cc458e8d3b
use composedPath() instead as it is standarized and cross-browser suported
2020-09-07 15:51:34 +02:00
Xavi Ferrer
37662e8dc1
prevent dropdown from being closed after event retargeting when bubbling out of a shadowRoot
2020-09-07 15:51:34 +02:00
Christoph Scholz
6319f566dd
fix emojis in case use_system_emojis == false
2020-09-05 11:33:25 +02:00
JC Brand
0594c480ff
Only consider chat 'hidden' flag in relevant view modes
2020-09-04 13:13:07 +02:00
JC Brand
c3d8f12050
Make api.user.status
API methods async
...
So that `_converse.xmppstatus` is defined before trying to set the
status.
2020-09-04 13:13:07 +02:00
JC Brand
4e7b29e417
Make sure initialize
can be awaited...
...
before `converse.initialize` has been called
In the process, remove other "core" promises. There is no core or
community plugins code awaiting on them and since it's possible to
call `converse.initialize` twice, I'm not sure it makes sense to even have them.
Also removed unused error class IllegalMessage.
2020-09-03 17:07:44 +02:00
JC Brand
cb53c86711
Don't use date-separator
CSS class for the new messages indicator
2020-09-03 13:06:17 +02:00
JC Brand
c41bdac6c8
Some work on componentizing the minimized chats UI
2020-09-03 13:06:17 +02:00
JC Brand
d5c93eb024
Create converse-root
custom element
...
This element can be used to declaratively insert Converse into the DOM.
You can put `<converse-root>` into the DOM (e.g. by rendering it inside
a React component) before or afer Converse has loaded and/or has been
initialized.
2020-09-03 13:06:17 +02:00
JC Brand
00df8b45fd
Bugfix. Check for image extension if image_urls_regex fails
2020-09-02 21:14:50 +02:00
JC Brand
496b070d2a
If adding .png fallback fails, revert to original URL
2020-09-01 12:21:32 +02:00
Ariel Fuggini
3535d05ff5
Removes query params from urls as set in config
2020-09-01 07:12:52 +02:00
JC Brand
eb016a2aa4
try/catch clauses should contain as little code as possible
...
To avoid catching unrelated errors, which can mask other issues in the
code and make debugging more difficult
2020-08-31 20:56:43 +02:00
JC Brand
831a9fa224
Append .png
to failed image URLs without extensions
...
Otherwise Imgur URLs don't render
2020-08-31 20:43:54 +02:00
Ariel Fuggini
6adec9a8d2
adds option to whitelist image domains
2020-08-31 20:38:09 +02:00
Ariel Fuggini
f88960c561
Added tests and documentation
2020-08-31 17:13:24 +02:00
Ariel Fuggini
94af11d7e3
adds setting to set non-image-extension image urls
2020-08-31 17:13:24 +02:00
Christoph Scholz
4d9d391365
add CustomElement to env
2020-08-31 17:03:23 +02:00
JC Brand
9348ac80b5
Override isHidden
in converse-minimize
...
Otherwise `isHidden` might return true because `minimized` is set to
`true` but `converse-minimize` is not enabled.
2020-08-28 15:32:58 +02:00
Ariel Fuggini
ce2827a342
Close modal on backdrop click
2020-08-28 08:53:03 +02:00
Christoph Scholz
823134d762
add html to converse.env
2020-08-24 23:48:24 +02:00
Xavi Ferrer
d50151c9dd
fix BOSH session restore
2020-08-24 11:46:24 +02:00
JC Brand
8c799efc58
Don't minimize chats by clicking the header
...
This prevents the burger menu from opening
2020-08-24 11:28:48 +02:00
JC Brand
9f0dfcdbdb
Wait before firing roomsAutoJoined
event
2020-08-24 11:05:51 +02:00
JC Brand
f7ef334fac
Rename method to better describe what it does
2020-08-18 21:09:39 +02:00
JC Brand
7cbb1b23b2
When opening a dropdown, don't prevent other dropdowns from closing
2020-08-18 15:09:37 +02:00
JC Brand
372da2107a
Bugfix. Pass event to handler
2020-08-17 21:30:54 +02:00
JC Brand
d44875e138
Translated using Weblate (Afrikaans)
...
Currently translated at 99.2% (497 of 501 strings)
Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/af/
2020-08-17 09:18:16 +02:00
JC Brand
cb2759a653
Regenerate pot and po files
...
Also fix i18n typo in src/converse-omemo.js
2020-08-17 09:03:44 +02:00
JC Brand
306b9fdd71
Updates #2193
...
Also remove top-level i18n declarations in components
2020-08-17 09:00:53 +02:00
JC Brand
11cd6b8321
Fixes #2193 .
...
Translations called at the top of template files don't apply, since the
trnaslations aren't yet fetched at that point.
2020-08-16 23:45:53 +02:00
JC Brand
3e8b3f73bd
Move pot and po files to src/i18n and regenerate
2020-08-16 22:54:45 +02:00
JC Brand
fbcd7cf737
Emoji picker: Make sure events persist across add/remove from DOM
2020-08-14 15:07:15 +02:00
JC Brand
d615cebcfe
Use proper i18n func
2020-08-13 15:37:50 +02:00
JC Brand
6e86fe3300
Fixes #1913 . Can't connect to non-ascii JID
2020-08-13 11:26:02 +02:00
JC Brand
09371712b0
Updates #1896 : Properly identify archived one-on-one messages
...
Also, rename attribute from `is_receipt_request` to `is_valid_receipt_request` to avoid confusion.
2020-08-13 11:09:22 +02:00
JC Brand
78bf07ecff
Make sure the registry is loaded before registering custom elements
2020-08-12 18:01:23 +02:00
JC Brand
cd84feefff
connection: Re-add debouncedReconnect
2020-08-12 17:50:18 +02:00
JC Brand
6fbb9463ee
Bugfix. Include nick in output messages
2020-08-12 14:39:10 +02:00
Xavi
7cdc592ed9
merge only relevant settings when calling api.settings.extend ( #2187 )
...
* merge only relevant settings when calling api.settings.extend
* test behaviour is the one expected and change doesn't break previous tests
2020-08-12 10:12:10 +02:00
Xavi
bd21f27f4f
fix api.settings.update warning message ( #2182 )
2020-08-10 08:06:24 +02:00
JC Brand
696c8e3522
Don't clear #conversejs
via innerHTML
...
It appears to break subsequent lit-html `render` calls on the
`#conversejs` element because lit-html still remembers parts from before
the element was cleared.
2020-07-30 12:17:23 +02:00
JC Brand
2fcce78144
Add a cleanup
hook
...
- Move view-related cleanup code out of core.
- Call `remove` on `_converse.chatboxviews` during cleanup
2020-07-30 11:04:07 +02:00
JC Brand
5579e82fb9
Add missing parameter
2020-07-29 16:22:20 +02:00
JC Brand
4927d561a5
Maintain scroll position when re-inserting #conversejs element
2020-07-29 09:56:22 +02:00
JC Brand
867f80e95e
Move MUC invite modal to its own file
2020-07-28 13:07:33 +02:00
JC Brand
23201991c1
Move the modal for adding MUCs to its own file
2020-07-28 13:07:33 +02:00
JC Brand
1898e7865d
Move the MUC list modal to its own file
2020-07-28 13:07:33 +02:00
JC Brand
16ca8044f8
Add experimental support for running the XMPP conneciton inside a shared worker
...
Still lacks inter-tab communication to update state across tabs, i.e.
when sending a 1-on-1 message in one tab, it doesn't appear in another,
because that information is not available via the websocket connection.
- Create a new `Connection` class that extends Strophe.Connection and
move related code from `converse-core.js` into this class.
- Store the session in localStorage when using a worker
- Move XEP-0156 code to connection.js
This allows us to initialize the connection without needing to know the
domain.
2020-07-27 12:43:47 +02:00
JC Brand
5e479d3bbb
OMEMO: Catch timing error while testing
2020-07-27 12:42:50 +02:00
JC Brand
29383301df
CSS: Fix horizontally centered spinner
2020-07-27 12:42:50 +02:00
JC Brand
a6c821be95
Use optional chaining
2020-07-24 11:50:54 +02:00
JC Brand
1419b4fc96
MUC: Add support for status code 333
2020-07-22 10:11:05 +02:00
JC Brand
cb50de16e2
Update 3rd party dependencies
2020-07-20 13:19:12 +02:00
JC Brand
1335a96dad
Bugfix. Handle emojis for which we don't have shortnames
2020-07-17 12:59:05 +02:00
JC Brand
0da8067129
MAM: Fix a MUC timing issue.
...
If a message comes in after joining the MUC but before the MAM messages
have been fetched, then converse-mam will query for MAM messages newer
than that message, causing an empty history (except for that one message).
2020-07-14 22:41:26 +02:00
JC Brand
712e14c4ee
Render chat history when a message gets removed
2020-07-14 18:14:17 +02:00
JC Brand
6a6d080679
Open images in a modal
2020-07-14 15:45:16 +02:00
JC Brand
6b62b51f11
Don't render images via u.addHyperlinks
...
It's currently only used by the MUC header to render URLs in the subject
2020-07-14 15:44:07 +02:00
JC Brand
91c130752c
chatview: Scroll down on image load
2020-07-14 14:17:54 +02:00
JC Brand
282ffc622f
Emoji picker fixes
...
- Don't replace entire textarea when entering a second emoji
- Focus emoji picker on tab completion when it's already opened
2020-07-14 11:38:00 +02:00
JC Brand
4de9816f24
Make sure emojis are initialized before parsing a message
...
for emoji related data
2020-07-13 15:45:37 +02:00
JC Brand
3519bfe7c6
Prevent duplicate minchats element
2020-07-13 15:45:32 +02:00
JC Brand
71add9c064
minimize: avoid unnecessary re-render
2020-07-13 14:31:59 +02:00
JC Brand
8f6b1f9049
Fix help menu icon colour and let it scroll
2020-07-13 11:17:29 +02:00
JC Brand
e6d8634194
Emoji picker: properly insert emoji upon click
2020-07-13 10:59:57 +02:00
JC Brand
756a85fb53
Emoji picker: make sure search results get properly updated
2020-07-13 09:55:01 +02:00
JC Brand
43ccc09cf2
Don't assume that converse is a global
2020-07-10 14:20:02 +02:00
JC Brand
cca5c17ccb
Fix failing test due to timing issue
2020-07-10 12:38:52 +02:00
JC Brand
d9fcb2b408
Hide emoji picker when sending a message via enter
2020-07-10 11:52:33 +02:00
JC Brand
5222881690
Bugfix. Properly determine when we've scrolled to top
2020-07-10 11:22:23 +02:00
JC Brand
d7bc129ce3
Get rid of Twemoji as a dependency
...
Fixes #2126
2020-07-10 11:21:45 +02:00
JC Brand
22573cf79b
Fixes #1637 aned #2130
2020-07-09 22:44:53 +02:00
JC Brand
1269cb7252
Don't attempt to fetch a VCard if we don't have a JID
2020-07-09 22:29:06 +02:00
JC Brand
8de55ce684
Updates #2087 . Only initialize minimized chats once
...
(i.e. not on reconnection)
2020-07-09 22:21:18 +02:00
JC Brand
99195ffd07
Fixes #2087
2020-07-09 22:11:04 +02:00
JC Brand
d0ba94e9df
Replace lodash templates with lit-html
2020-07-09 22:08:23 +02:00
JC Brand
54ffd90087
Make sure the emoji picker is focused...
...
the first time it's opened
2020-07-09 21:21:17 +02:00
JC Brand
45ebc70bfe
Let escape close the emoji picker
2020-07-09 21:14:13 +02:00
JC Brand
a014eca9e7
Add a renderImage
directive which handles errors
2020-07-09 20:51:32 +02:00
JC Brand
8943609d10
Refactor the body directive
...
Changes how rich message markup is generated and kept track of.
We now have a MessageText class which subclasses String and which keeps
track of the rich markup associated with the message.
2020-07-09 20:50:25 +02:00
JC Brand
78925b011d
Updates #2126
...
Wait for emojis to be initialized before parsing MAM messages
2020-07-08 14:08:08 +02:00
JC Brand
51ad0e3708
Fix toggling of the spoiler form
2020-07-08 11:33:06 +02:00
JC Brand
4bf823f6cd
Fix show/hide of spoilers
2020-07-08 10:22:20 +02:00
JC Brand
c3d6b64f4b
Turn the chat toolbar into a component
...
- Declaratively render the emoji picker dropup
- Got rid of converse-emoji-views
- Adapt OMEMO to the new buttons stuff
- Make emojis json global, to try and speed up tests
- omemo: Move functions to the top of the module
2020-07-08 10:17:06 +02:00
JC Brand
de1cc396bb
registry: avoid registering already registered custom elements
...
which throws and error and causes tests to fail
2020-07-07 13:18:50 +02:00
Ariel Fuggini
82357f7d97
Created a web component registry and exports components as modules in order to facilitate their customization
2020-07-07 11:44:34 +02:00
JC Brand
eafa1573e7
Prefix the icon anchors to make them more unique
2020-07-02 11:56:37 +02:00
JC Brand
f4f183bc46
Rendeer SVG icons inline
...
to overcome cross-site restrictions on using the `use` attribute of the `<svg>` element.
2020-07-02 01:21:40 +02:00
JC Brand
2cb1af3dea
Assign the Skeletor Events API to CustomElement
...
So that components can use `listenTo`
2020-07-01 09:25:14 +02:00
JC Brand
4f209e9f04
Bugfix. Updates #2091
2020-06-30 14:19:46 +02:00
JC Brand
f8efd94249
Don't smooth-scroll upon first appearance of the chat
...
it's annoying in overlayed view-mode where the user might be navigating
around the site.
Fixes #2091
2020-06-30 14:11:53 +02:00
JC Brand
061142e0c3
Bugfix. Don't scroll down if the user had manually scrolled up
2020-06-29 14:56:27 +02:00
JC Brand
9392377ffd
chatview: Remove unused template and method
2020-06-26 16:08:34 +02:00
JC Brand
9026062a32
Render chatbox message form via lit-html
2020-06-26 16:08:34 +02:00
JC Brand
22b2875b52
emoji-picker: Move picker content into another component
...
to avoid re-rendering them when non-relevant properties change
2020-06-25 14:31:01 +02:00
JC Brand
b7a40dad41
Add a title attribute to emojis in messages
...
so that you can see the shortname when you hover your mouse over an emoji.
2020-06-25 11:19:07 +02:00
JC Brand
1b520328fa
Wait until emojis are initialized...
...
before adding them to the message body
2020-06-25 10:27:29 +02:00
JC Brand
b3e34a0636
Turn the emoji picker into a web component
2020-06-25 10:27:29 +02:00
JC Brand
be20b8e1a0
emojis: fix rendering of custom emojis
2020-06-25 10:24:45 +02:00
Ariel Fuggini
77a0a01eff
Makes message with errors non-editable ( #2089 )
...
* Makes message with errors non-editable
2020-06-25 10:22:44 +02:00
Ariel Fuggini
346e5d896f
Updated selector
2020-06-25 10:19:56 +02:00
JC Brand
b6dabf7381
muc: Ensure that exact nicknames (and not substrings) are matched
2020-06-22 13:57:44 +02:00
JC Brand
e2fbfa7470
modtools: Better error reporting
2020-06-22 13:13:44 +02:00
JC Brand
a31d245136
Update to eslint 7.3.0
2020-06-22 11:01:19 +02:00
JC Brand
0120f78c87
modtools: Don't show admin
...
...
as assignable affiliation when the current user is an admin.
https://xmpp.org/extensions/xep-0045.html#affil-priv
2020-06-22 10:50:49 +02:00
JC Brand
7c29ae4a8a
Improve stying for /me messages
...
Show the actions dropdown on the right, like with other messages, and
don't wrap them.
2020-06-18 16:54:12 +02:00
JC Brand
0cc088a523
Use the assets_path setting for the icons sprite
2020-06-18 13:45:03 +02:00
Ariel Fuggini
73d33e1161
Makes mentions case-insensitive, plus parsing functionality refactor ( #2061 )
2020-06-18 11:19:01 +02:00
JC Brand
2009a94ba4
Update to Strophe 1.3.6
...
Fixes #2067
2020-06-15 15:39:33 +02:00
Ariel Fuggini
bab71485ca
Fixed bug
2020-06-15 14:35:42 +02:00
Ariel Fuggini
a78763b510
Focus on message textarea when pressing escape on emoji dropdown
2020-06-15 14:35:42 +02:00
JC Brand
6b55907ddd
Bugfix. Don't remove affiliated members on probe response
...
by checking for the affiliation data on the probe response presence and
not on the occupant model (which might be created from a message and
therefore not yet have up to date affiliation data).
2020-06-15 12:42:20 +02:00
JC Brand
85688d1871
Add missing event registration for the ChatBoxView
2020-06-12 15:04:10 +02:00
Ariel Fuggini
29bc4215bd
Moved event listener to title container
2020-06-12 15:03:53 +02:00
JC Brand
de583cbd32
Don't nest chat-msg__txt inside converse-chat-message-body
...
instead just set the classes directly on the custom element
As far as I can tell, this fixes #1346 (or it was fixed already)
2020-06-12 14:05:33 +02:00
JC Brand
59a5acf249
Fixes #2064 (for real this time)
2020-06-11 17:29:44 +02:00
JC Brand
80c955f267
Fix "retry" feature for message errors.
...
By registering a one-time event handler for a unique event name
2020-06-11 17:29:44 +02:00
JC Brand
abec9bc39e
Fixes #2064 and move message markup into template
...
After some back-and-forth, I think it's still better to keep markup in
templates (instead of having them directly inside the components)
becaues it makes it easier for people to modify Converse.js (at the
expense of some developer ergonomics).
2020-06-11 15:27:45 +02:00
JC Brand
cf258f0b4c
Add new public API method converse.insertInto
2020-06-10 12:42:46 +02:00
Ariel Fuggini
48fcbfa5ea
Finds names by RegExp with i
param for case insensitive
2020-06-09 10:33:21 +02:00
JC Brand
b0cb489769
Use @converse/skeletor, lodash-es and latest webpack-dev-server
2020-06-08 19:38:16 +02:00
JC Brand
b511f1d950
Updates #1896 : Use right flag to checked if message is archived
2020-06-08 12:25:49 +02:00
JC Brand
1059b30641
Use lit-html to render the toolbar
2020-06-06 23:23:12 +02:00
JC Brand
c2c1db587f
Create a component which renders message actions in a dropdown
2020-06-05 16:02:58 +02:00
JC Brand
dd7bb28d86
Report traceback when waitUntil
times out
2020-06-05 15:49:18 +02:00
JC Brand
58d018e868
Bugfix. Don't scroll down when user manually scrolled up
2020-06-05 12:01:06 +02:00
JC Brand
cf2497656a
components/message: Add fallbacks if VCard is not defined
2020-06-04 15:34:06 +02:00
JC Brand
18b0d8db3f
Don't indent followup messages when messages don't have avatars
2020-06-04 15:29:06 +02:00
JC Brand
7b0e9df41e
New config option: show_message_avatar
2020-06-04 14:27:51 +02:00
JC Brand
95b015f01a
Allow disabling of the bosh plugin
2020-06-03 17:43:57 +02:00
JC Brand
09a79d609f
Create an image picker component and use it in the profile modal
2020-06-03 13:53:52 +02:00
JC Brand
c82e3e9bda
Update api.vcard.set
to also update the VCard model
2020-06-03 13:32:44 +02:00
JC Brand
b4e4248f40
Fixes #1960
2020-06-03 13:26:38 +02:00
JC Brand
9f7b6d6fa1
Fixes #2035
2020-06-03 10:56:38 +02:00
JC Brand
88c7d49054
Fixes #2039
2020-06-03 10:52:41 +02:00
JC Brand
0f33960d5e
Dropdown doesn't hide when clicking bookmark menu item in MUC
2020-06-03 10:48:29 +02:00
JC Brand
d325059c28
Fix styling issue for the unread badge
2020-06-03 10:38:46 +02:00
JC Brand
85e9169b35
Use the API to read settings
2020-06-03 10:15:05 +02:00
JC Brand
830e060568
Rename api.settings.update
to api.settings.extend
...
This is to try and make it clearer that this method won't override
initialization settings, and is instead simply to add to the default
settings.
2020-06-03 09:32:16 +02:00
JC Brand
1ff6ced3ab
Don't override initialization settings via api.settings.update
...
This is a problem that could occur when calling converse.initialize twice
2020-06-03 09:15:35 +02:00
JC Brand
5a57ded243
Add support for the XEP-0333 displayed
chat marker
...
Credit for this work goes to @deleolajide
2020-06-01 18:01:02 +02:00
JC Brand
ac36adddfe
Re-add support for a new messages indicator
...
Fixes #2040
2020-06-01 16:52:12 +02:00
JC Brand
7651d58470
Render chat messages as web components
...
- Render chat content as a <converse-chat-content> component
- Create new component for rendering the message body
- Get rid of `showMessage` method
2020-06-01 09:53:19 +02:00
GRUNBLATT Remy
9050b2fe88
Oauth Provider settings should be an array and not an object for forEach to work
2020-06-01 09:36:54 +02:00
genofire
4b1efd1e1f
fix ad-hoc commands checkbox
2020-06-01 09:25:41 +02:00
genofire
b1817daa12
fix ad-hoc commands sessionid
2020-06-01 09:25:41 +02:00
Ariel Fuggini
120f02d728
Minimize chat when clicking on title bar
2020-06-01 09:11:48 +02:00
Ariel Fuggini
d77f8d9fec
Rearranged ifs to prevent unwanted spaces
2020-05-26 18:31:57 -05:00
JC Brand
e8f1f6d528
Pass both hat title and URI to template
2020-05-20 14:13:51 +02:00
JC Brand
ca7adeedbd
Save hat URI, not id
2020-05-20 13:44:29 +02:00
JC Brand
1e44f45a68
core: Don't expect Strophe.BOSH to be defined
2020-05-18 18:51:40 +02:00
JC Brand
bf4b3efa5b
Import _converse and api
2020-05-18 10:54:37 +02:00
JC Brand
9813d43f0b
dom-navigator: Don't rely on global converse
obj
2020-05-18 10:12:27 +02:00
JC Brand
2a62e9dc29
ad-hoc: Handle errors when fetching commands for an entity
2020-05-14 16:12:00 +02:00
JC Brand
ef66f2e35d
Make sure messages re-render when 'error' is added
2020-05-14 15:00:47 +02:00
JC Brand
3cca2fdb7f
roster: Filter contacts via all available information
2020-05-14 12:20:23 +02:00
JC Brand
a6129eeb78
Import converse instead of relying on window
2020-05-14 11:18:45 +02:00
JC Brand
35cde98e71
Fix i18n string parsing error
2020-05-14 11:18:13 +02:00
JC Brand
b8f2db6e33
Move ModeratorToolsModal to separate file
2020-05-13 15:16:46 +02:00
JC Brand
49ff6369c9
Split out dropdown base class
2020-05-13 14:26:58 +02:00
Dele Olajide
cae5e9c875
Updates #1999 - Demarcate first unread message
2020-05-13 13:39:33 +02:00
JC Brand
6157189efe
muc: Make sure heading renders for pre-existing occupants
2020-05-13 13:29:55 +02:00
Ariel Fuggini
c70a256eb1
Added mailto protocol to safe list
2020-05-13 11:18:39 +02:00
JC Brand
efb486511c
Add another test for registration errors and fix bug
2020-05-12 15:32:52 +02:00
JC Brand
2f60c4399a
core: SimplifyonDisconnected
2020-05-12 14:52:21 +02:00
JC Brand
2e6bfb6717
Set connection status values via constants
2020-05-12 14:51:34 +02:00
JC Brand
c2143f617a
Bugfix. Converse.js stopped reconnecting
...
When `_doDisconnect` is called in Strophe, `authentication` is set to
`false`, so reconnection wouldn't happen anymnore
Updates #1490
2020-05-12 11:50:13 +02:00
JC Brand
2b5aeb5ed1
Document interaction between muc_send_probes and muc_fetch_members
2020-05-12 11:23:35 +02:00
sedrubal
20d70a042b
Use <code> instead of <span> for fingerprint
2020-05-12 10:55:11 +02:00
Ariel Fuggini
5674056c3f
Fixes, added tests
2020-05-07 18:28:19 +02:00
Ariel Fuggini
79510302fd
Disallow malformed urls and urls with non-approved protocols
2020-05-07 18:28:19 +02:00
JC Brand
555c0966cc
muc: save error response to a sent message onto the original model
2020-05-07 13:32:56 +02:00
JC Brand
3319398f17
muc: Don't show unnecessary affiliation change message
2020-05-07 10:03:28 +02:00
JC Brand
b64b20c44d
muc: fall back to finding occupant by nick
2020-05-06 18:01:59 +02:00
JC Brand
1ddf1032f5
Register listeners when occupant is added to a message
2020-05-06 18:01:59 +02:00
JC Brand
d49b630bdc
Enable sending of MUC presence probes
2020-05-06 18:01:59 +02:00
JC Brand
98faa71e65
muc: Ensure message rerenders when occupant is added
2020-05-06 18:01:59 +02:00
JC Brand
e621362471
mam: include chatbox in data sent via MAMResult
2020-05-06 18:01:59 +02:00
Ariel Fuggini
a0de42503e
Prevent selecting text in background when resizing chat box
2020-05-01 14:04:23 +02:00
JC Brand
fa30563937
Don't assume that window.converse is always defined
2020-04-30 13:27:01 +02:00
JC Brand
089a54281e
Bump various 3rd party dependencies
2020-04-29 16:01:33 +02:00
Christoph Scholz
a7deb2021a
make use_system_emojis==false work
2020-04-29 11:25:08 +02:00
JC Brand
5546085f0d
Add keywords
2020-04-29 11:17:21 +02:00
JC Brand
f20e14282a
Re-add log to _converse object
2020-04-29 10:19:57 +02:00
JC Brand
db69d724bb
Fix typo in js-xss data
...
updates #2006
2020-04-28 21:28:33 +02:00
JC Brand
2963830916
Trigger sendMessage
event
2020-04-28 17:46:57 +02:00
JC Brand
82b7e2846a
Use outerHTML to render existing nickname form
2020-04-28 12:11:40 +02:00
Ari F
60134c4d35
Fixed bug showing occupants sidebar on browser tab switch
2020-04-28 12:11:40 +02:00
Christoph Scholz
f78a1372e3
fix rendering of muc_roomid_policy_hint
2020-04-28 10:52:49 +02:00
JC Brand
5efb7b2a84
MUC: provide feedback when no rooms found
2020-04-27 18:31:56 +02:00
JC Brand
b5eea12d49
Refactor so that message attributes are parsed early
...
It's better to parse an incoming message stanza early, than to have
all kinds of methods throughout the codebase that does querySelector
etc.
Firstly, it allows us to catch and report errors and malicious stanzas early on.
It also simplifies programming because you don't need to try and
remember how to properly parse a stanza, all the work is done upfront
for you.
2020-04-27 16:34:37 +02:00
JC Brand
27008aff66
Bugfix. Add missing variable for string interpolation
2020-04-27 16:30:46 +02:00
JC Brand
bad815b429
Bugfix. Don't create multiple RosterContactView objects
2020-04-27 16:30:33 +02:00
JC Brand
958379682a
muc: Render role change messages as ephemeral notifications
2020-04-23 15:11:36 +02:00
JC Brand
c6f8ef0c46
Various JSDoc related fixes and improvements
...
Using the `@method` directive on a `@class` means that the method
doesn't appear.
2020-04-23 13:55:08 +02:00
JC Brand
b44c0c266c
mam: Add MAMResult
hook
2020-04-23 13:55:08 +02:00
JC Brand
ad4999384d
Reduce unnecessary logging in tests
2020-04-23 13:52:21 +02:00
JC Brand
7e2552bd8c
core: Allow multiple imports
2020-04-23 13:50:35 +02:00
JC Brand
7eb6a17fd2
Add the ability to run tests via the webpack devserver
2020-04-21 20:18:43 +02:00
JC Brand
ac3e87965f
Remove unused import
2020-04-20 19:48:09 +02:00
JC Brand
d9c41f62cf
Add install
recipe as alias to build
and dist
2020-04-20 18:49:02 +02:00
JC Brand
c1efb0d2b4
Add an external API for sending presences
2020-04-19 09:41:38 +02:00
JC Brand
edf7f6b8d3
Show status messages via object creation
2020-04-19 08:11:53 +02:00
JC Brand
8a7b25584d
Show error messages via objects
...
Instead of injecting them directly into the DOM.
2020-04-19 08:03:44 +02:00
JC Brand
4131850429
Allow setting of affiliation on JID of user not in the MUC
2020-04-19 06:49:03 +02:00
JC Brand
2696c26ffb
Add new config setting allow_adhoc_commands
2020-04-17 15:01:12 +02:00
JC Brand
fb92229f22
Rename modal
2020-04-17 14:29:09 +02:00
JC Brand
5e91adbf4e
Update various 3rd party dependencies
2020-04-17 11:40:14 +02:00
JC Brand
78b60a3bd9
Fixes #515 Add support for XEP-0050 Ad-Hoc commands
2020-04-17 11:01:44 +02:00
JC Brand
60b3f7ae25
Add an autocomplete component
2020-04-17 11:01:44 +02:00
JC Brand
4c872164c3
Bugfix. Don't show 'undefined' for nick
2020-04-17 10:50:30 +02:00
JC Brand
be3cbe6dc3
Downgrade dayjs
...
Due to this bug: https://github.com/iamkun/dayjs/issues/792
2020-04-15 17:47:50 +02:00
Dele Olajide
f97d827280
fix #1963 - Mentions are visually incorrect when used in message replies ( #1968 )
...
* fix #1963 - Mentions are visually incorrect when used in message replies
2020-04-15 12:25:53 +02:00
JC Brand
38bb845ce7
muc-views: ensure MUC becomes visible when opened via modal
2020-04-15 12:24:34 +02:00
JC Brand
f68f577b71
muc-views: Update ListChatRoomsModal to make better use of lit-html
2020-04-15 11:54:07 +02:00
JC Brand
c9084e4ed5
muc-views: Present challenge to destroy
confirmation
...
And also allow the user to specify the JID to where the conversation has
moved to.
2020-04-15 09:30:10 +02:00
JC Brand
16c58a966a
modal: Add ability to show multiple input fields for confirm modal
2020-04-15 09:29:52 +02:00
JC Brand
78b1a5c42a
Show send button by default
2020-04-14 14:49:09 +02:00
JC Brand
5cb65d84f1
Bugfix. Don't assume OMEMO store is always there
2020-04-14 14:04:26 +02:00
JC Brand
5ea7a4d127
MUC: Small updates to message fetching and queueing
...
- Always clear queue after fetching messages from cache
- Empty `message_queue` without waiting for all messages to first be processed.
- Don't assume that `this.messages` is set by the time `queueMessage` is called
2020-04-14 12:29:12 +02:00
JC Brand
df9612f937
Add support for XEP-0317 MUC Hats
2020-04-13 22:57:29 +02:00
JC Brand
e2a7045e22
Move MUC presence parsing code to src/headless/utils/stanza.js
2020-04-13 18:22:15 +02:00
JC Brand
a1d5563963
Move OMEMO-related message parsing to utils/stanza.js
2020-04-13 17:44:47 +02:00
JC Brand
ce1f7e090e
Rename getMessageAttributesFromStanza
to parseMessage
2020-04-13 17:44:47 +02:00
JC Brand
fef5292a12
Replace JID with 'XMPP Address'
2020-04-13 14:46:31 +02:00
JC Brand
2dd6bc85ea
Fixes #1961
...
Make sure dist dir is included in headless NPM package
2020-04-13 11:45:02 +02:00
JC Brand
8824bb26c4
Bump various dependencies
2020-04-13 11:39:00 +02:00
JC Brand
e91a38547a
MUC: create role/affiliation change message objects
...
in @converse/headless instead of injecting HTML via the view
2020-04-13 11:21:40 +02:00
JC Brand
08b402a9c1
MUC: check for author to avoid "cleared" message for empty subject
2020-04-10 20:47:07 +02:00
JC Brand
bd00bc4bca
muc-views: move event listeners further down
2020-04-10 16:49:02 +02:00
JC Brand
c4c7e41981
MAM: better error logging
2020-04-10 16:04:46 +02:00
JC Brand
8b496d085e
Enable XEP-0156 support by default
2020-04-10 15:25:49 +02:00
JC Brand
35de251ce7
Make sure IQ timeouts are properly logged
2020-04-10 14:41:23 +02:00
JC Brand
4425c3dde7
Always show a new topic, even if the previous one was hidden
2020-04-08 14:31:18 +02:00
JC Brand
bc4d016557
Don't show duplicate topic change notifications
2020-04-08 13:08:15 +02:00
JC Brand
c4ba6735ba
Bugfix. Can't cast undefined to array
2020-04-07 22:15:36 +02:00
JC Brand
a065b0c88c
MUC: Clear typing notification when a message is received
2020-04-07 22:04:25 +02:00
JC Brand
c7e702368b
Properly clear user settings
...
by first waiting until the model has been set up.
2020-04-07 19:07:51 +02:00
JC Brand
fe635989a1
Add support for Finnish translations
2020-04-07 13:47:34 +02:00
JC Brand
9a6d6ddd1f
muc-views: don't assume we already have the occcupant
2020-04-07 13:07:16 +02:00
JC Brand
8c5e4b95d0
Updates #1939 : Enable smooth scrolling for short distances
2020-04-07 13:06:37 +02:00
JC Brand
5fd316816d
MUC: Don't show topic change notification for old changes.
...
Also, show topic by creating a message object, instead of directly
inserting HTML into the DOM. This is a necessary precursor to being able
to render chat messages via lit-html/lit-element.
2020-04-07 11:49:12 +02:00
JC Brand
3e27a5ec81
Template fix. Don't render boolean value
2020-04-07 10:29:28 +02:00
JC Brand
e18fe5e212
Use the getHeadingButtons
hook instead of overrides
2020-04-07 10:20:43 +02:00
JC Brand
75d64c04d9
Add a hooks API
...
for triggering interceptable events with the goal of modifying data.
2020-04-06 17:22:06 +02:00
JC Brand
121a3f9bed
minimize: Use events instead of overriding initialize
methods
2020-04-06 17:22:06 +02:00
JC Brand
531ebf335c
Properly test and fix show/hide of MUC topic
2020-04-06 15:27:32 +02:00
Dele Olajide
10da630d8a
fix #1937 - Editing a message removes the mentions highlight ( #1938 )
...
* Fixes #1937 Editing a message removes the mentions highlight
2020-04-02 11:45:04 +02:00
JC Brand
bb9e394e93
muc: handle join/leave notifications similarly to CSNs
...
Remove the `muc_show_join_leave_status` config setting.
We don't show the optional statuses at all now.
2020-04-01 14:34:11 +02:00
JC Brand
c20dbbbbbd
Store in user settings whether a MUC topic is hidden or not
2020-03-31 22:57:22 +02:00
JC Brand
e498657323
Add API for setting and accessing user settings
2020-03-31 15:01:02 +02:00
JC Brand
6391cc0803
Rename applyUserSettings to applySiteSettings
2020-03-31 14:08:34 +02:00
JC Brand
030c26a8ab
Use api
shortcut instead of _converse.api
2020-03-31 13:16:24 +02:00
JC Brand
d057177f1b
core: Further cleanup and refactoring
2020-03-31 12:51:30 +02:00
JC Brand
8b1d4e0e9d
core: refactor initialize method to make it as small as possible
2020-03-31 12:28:11 +02:00
JC Brand
631b9bb438
Use the settings API for setting and getting config settings
...
This is an initial step towards no longer storing and accessing settings
directly via the `_converse` object
2020-03-31 11:57:03 +02:00
JC Brand
8d81637388
Bugfix. Make sure empty history feedback message gets removed
...
when messages appear
2020-03-30 05:34:47 +02:00
JC Brand
095a1bc56b
Fixes #1490 . Don't reconnect if were weren't auth'd to begin with.
2020-03-30 05:29:21 +02:00
JC Brand
690ff1fba1
Fixes #1860
2020-03-30 04:13:46 +02:00
Holger Weiß
63b1886f50
Add missing space left to "Open Groupchats" label ( #1925 )
2020-03-26 11:30:40 +01:00
JC Brand
321a54323e
Allow moderators to retract their own messages...
...
when retractions are restricted to mods only
2020-03-26 10:35:08 +01:00
JC Brand
e363c02041
CSS: display rendered images as blocks
2020-03-25 10:39:41 +01:00
JC Brand
42235167f8
Bugfix. Fall back to JID if nick is not set
2020-03-25 09:02:31 +01:00
JC Brand
e3bd7b45f5
Distinguish between chat content and messages content.
...
Fixes a bug that prevented scrolling from working correctly
2020-03-24 14:34:57 +01:00
JC Brand
dc2eb30120
Bugfix
2020-03-24 12:49:35 +01:00
JC Brand
967154d314
Use optional chaining instead of lodash.get
2020-03-24 12:30:45 +01:00
JC Brand
7812d4e7b6
Show chat state notifications inside the scrollable area
...
Rename CSS class to conform to convention
2020-03-24 11:28:50 +01:00
JC Brand
4727f3b3bb
Add support for optional chaining and nullish coalascing
2020-03-24 09:38:32 +01:00
JC Brand
5e27579ebe
Don't ignore groupchat messages that also contain a CSN
2020-03-23 20:54:27 +01:00
JC Brand
57709b2e78
Sort modtools search results by nickname
2020-03-23 18:06:36 +01:00
JC Brand
00cac6d250
Add the ability to filter the results in the modtools modal
2020-03-23 14:34:19 +01:00
JC Brand
b5d57f0ef8
Handle and render chat state notifications separately from messages
2020-03-21 17:21:53 +01:00
JC Brand
283a810d6b
Use lit-html to render chatbox outlines
2020-03-21 17:21:53 +01:00
Rémy Grünblatt
bf063d4df7
Fix oauth provider template ( #1916 )
2020-03-20 11:31:35 +01:00
JC Brand
ca012d4479
Update to newer Skeletor.js
...
`.forEach` on a Collection no longer returns the models, so need to
update some tests.
2020-03-12 15:24:29 +01:00
JC Brand
89795504a2
Add support for rendering images from Twitter
2020-03-10 12:08:07 +01:00
JC Brand
6fe802a96b
Replace lodash methods with native ones
2020-03-06 15:49:48 +01:00
JC Brand
91243f64af
Replace lodash methods with native ones.
2020-03-06 14:42:05 +01:00
JC Brand
b6b00887e4
Export BootstrapModal
2020-03-06 12:24:23 +01:00
JC Brand
c9f29f76e5
Use lit-html to render URLs
2020-03-06 12:24:23 +01:00
JC Brand
366dee0aa5
Bugfix. Allow moderators to retract their own messages
2020-03-05 13:42:58 +01:00
JC Brand
a7f28cd61d
When creating message objects, wait for confirmation from storage
...
Queue messages and handle them sequentially, each time waiting for promises to
resolve before handling the next message.
Updates #1899 , which likely happens because an error message is received
before messages have been fetched.
2020-03-04 15:14:57 +01:00
Lance Stout
a6aaf3f595
Update chat state notifications when message is edited.
2020-03-03 15:24:15 +01:00
JC Brand
831e59c1a7
controlbox: Wait when saving while closing
...
Otherwise we run into race conditions while testing
2020-03-03 14:38:29 +01:00
JC Brand
8aaa1a6417
core: Make clearSession
a synchronous event
...
In order to give plugins time to properly clear data from the browser storage.
2020-03-03 10:23:46 +01:00
JC Brand
9295850789
controlbox Only call show/hide callback when the action was actually done
2020-03-03 08:21:55 +01:00
Dele Olajide
5a9f8218c8
Fix issue 1896 ( #1897 )
...
* fix issue https://github.com/conversejs/converse.js/issues/1896
* Added issue to CHANGES.md
2020-02-28 11:24:25 +01:00
JC Brand
f02caff854
Rejoin the MUC if we receive an empty message
2020-02-27 16:40:29 +01:00
JC Brand
34c4b2aa5e
Prevent empty messages from being created
2020-02-27 15:09:54 +01:00
JC Brand
804c78de81
Prevent # being added to URL when minimizing
2020-02-27 11:16:45 +01:00
JC Brand
2af93f4492
modtools: settings for which roles/affiliations may be queried or assigned
2020-02-22 23:16:22 +01:00
JC Brand
e5341d54a9
Bugfix. Dangling moderation messages not applied
2020-02-22 22:59:30 +01:00
JC Brand
61e86a3c23
Fixes #1535
...
Add option to destroy MUC in the dropdown context menu.
Also add a confirmation dialog.
2020-02-22 20:22:02 +01:00
JC Brand
7dc0b7bb13
Handle case where we don't have the occupant
...
It can now happen because we also auto-complete for nicks based on
messages in the chat
2020-02-21 17:33:46 +01:00
JC Brand
5fe23f477f
modtools: Fetch affiliation list when we haven't fetched it by default
2020-02-21 16:20:30 +01:00
JC Brand
2c5cde050e
CSS: fix bookmark indicator color and add title
2020-02-21 15:30:28 +01:00
JC Brand
c69a2abc45
modtools: Replace Backbone.View events with lit-html events
2020-02-21 15:25:57 +01:00
JC Brand
d07b9510a2
modtools: Show affiliations tab first
2020-02-21 15:01:19 +01:00
JC Brand
a1a2b501ee
modools: Restrict which affiliations and roles can be set
...
bsaed on `muc_disable_slash_commands`
2020-02-21 13:21:25 +01:00
JC Brand
cd442f27c4
modtools: Remove duplicate roles in dropdown
2020-02-21 13:06:15 +01:00
JC Brand
3c9ec96350
MUC: create references for nicks gathered from messages
2020-02-21 12:30:40 +01:00
JC Brand
2ac33c77b3
Fix linting errors
2020-02-20 19:18:06 +01:00
JC Brand
d361d1d0a3
MUC: Include nicks from messages in the mentions auto-complete list
2020-02-20 19:14:34 +01:00
JC Brand
62ef18a027
muc_fetch_members now accepts an array of affiliations
2020-02-20 18:39:56 +01:00
JC Brand
590a8862bc
Don't validate message creation
...
This causes messages to be created but then not populated, causing empty
messages appearing in the chat after page relaod.
Fixes #1886
2020-02-20 13:08:12 +01:00
JC Brand
c7e57936fb
Bugfix. Handle empty content
2020-02-20 13:08:12 +01:00
JC Brand
49817a850f
MUC: Queue messages received before we're ready
2020-02-20 07:13:04 +01:00
JC Brand
58f6d36564
MUC: wait for messages collection to be initialized
...
before processing MUC messages received prematurely due to SMACKS
resumption.
2020-02-19 14:22:24 +01:00
JC Brand
0137eb88ae
Smacks: Handle MUC messages received before the MUC exists
2020-02-19 13:39:07 +01:00
JC Brand
5b5c4595cc
Rename hide_subject
to subject_hidden
2020-02-18 17:26:49 +01:00
JC Brand
ce08819a43
Retracted moderated sent message should not be editable.
2020-02-18 16:47:52 +01:00
JC Brand
ead8cdbcd6
Retracted moderated message should not be editable.
...
Also, don't set retracted MUC messages as ephemeral, we want to keep on
showing them to provide context in a MUC.
2020-02-18 16:06:59 +01:00
JC Brand
227b70339c
Bugfix. Retracted messages shouldn't be editable.
2020-02-18 15:45:55 +01:00
JC Brand
004d2b7f23
Fix method name in log
2020-02-18 15:45:55 +01:00
JC Brand
bcbde04530
Copy sounds dir to dist and use assets_path
for sounds_path
2020-02-16 12:30:25 +01:00
JC Brand
f564a1edaf
Show reason and actor for ban/kick events
2020-02-14 13:19:12 +01:00
JC Brand
39d140005e
Change when/how chats are shown
...
Goal is to fix a timing bug that results in `show` being triggered
before the `ChatBoxView` has been initialized, which means that 1:1
chats aren't opened when you reload the page.
2020-02-14 11:06:04 +01:00
JC Brand
3400acbfeb
Show MUC buttons in a dropdown menu
...
- Get rid of the ChatBoxHeading class
- Add support for showing standalone buttons in overlay viewmode
2020-02-13 20:57:47 +01:00
JC Brand
ed411c226d
Avoid creating Message objects for empty messages
2020-02-13 16:31:13 +01:00
JC Brand
181d18fcfe
Translation and undefined variable fixes
2020-02-11 10:13:23 +01:00
JC Brand
64f5bfa09f
Don't gatekeep rendering of the chatroom heading
2020-02-10 23:21:35 +01:00
JC Brand
faa02b058d
Make sure messages Collection exists when we receive an error message
2020-02-10 18:41:32 +01:00
JC Brand
893ef10563
Use lit-html to render chat head
2020-02-07 16:09:12 +01:00
JC Brand
2235d4c432
Use lit-html to render MUC heading
2020-02-07 14:58:26 +01:00
JC Brand
15f15e9a09
Bugfix. Declare parameter
2020-02-07 13:34:22 +01:00
JC Brand
7d91b17552
Rename methods to clarify their purpose
2020-02-07 12:42:19 +01:00
JC Brand
fb9fe280ac
Updates to how dupes are detected.
...
- Collapse 3 different loops into one.
- Check all saved stanza ids in the parsed attrs, not just the archive id
- Remove check for archive id in converse-mam since it just duplicates what's now being done in converse-chat
- Don't use disco to check for support, XEP-359 mandates that services SHOULD advertise support,
which is not a strong enough guarantee that they do.
updates #1856
2020-02-07 12:35:45 +01:00
JC Brand
746fe441e2
Updates the message parsing.
...
Only set `id` once we've actually parsed the sender attributes,
otherwise `attrs.from` is `undefined`.
Use `Array.prototype.reduce` to generate stanza_ids attributes map.
Add `from_muc` attribute which contains the MUC JID
2020-02-07 12:12:38 +01:00
JC Brand
d2b6b41128
emoji-picker: Make sure that emojis as images are rendered properly
2020-02-06 16:27:44 +01:00
JC Brand
976c3d6006
Remove the formdata and promise polyfills
2020-02-06 15:20:29 +01:00
JC Brand
a1670462ca
Remove jquery and undersscore shims
2020-02-06 14:51:50 +01:00
JC Brand
9b279ad39d
Various emoji-picker fixes after recent refactoring
...
- Fix choosing of a categoy
- Make the highlight color darker (more visible)
2020-02-05 23:20:51 +01:00
JC Brand
9e86b5e8df
emoji-picker: Disable using the right arrow to initiate keyboard nav
2020-02-05 18:05:32 +01:00
JC Brand
4b3d330190
Avoid sending blur event when navigating the emoji picker
...
Also, listen to the `focusin` and `focusout` events, since they bubble,
allowing us to listen on the chatbox itself.
2020-02-05 16:08:54 +01:00
JC Brand
f854e477b7
Add placeholder to MUC invite modal input
2020-02-03 23:24:44 +01:00
JC Brand
7279f08a34
Update to newer skeletor which can return a promise on create
2020-02-03 23:24:44 +01:00
JC Brand
7d7c41a135
OMEMO: fix timing errors
...
- Use async/await
- Wait for devices to be created before continuing
2020-02-03 23:24:44 +01:00
JC Brand
f78837cbc5
Refactor identification of duplicates...
...
to rely on the parsed stanza attributes
This was to fix a bug whereby a full stanza was used to query for 1:1
messages with a full JID when the bare JID is stored.
We now are sure that the attributes we're using to query for duplicates
are the same attributes that get saved for a messages.
2020-02-03 23:24:44 +01:00
JC Brand
6430691c22
Fix template condition
2020-01-31 22:50:13 +01:00
JC Brand
6b4bdb636e
sidebar: Show shortened text in overlay mode
2020-01-30 22:03:08 +01:00
JC Brand
e3708bd598
Refactor headlines list to render everything with one view
2020-01-30 19:57:04 +01:00
JC Brand
c55a2171d5
Refactor headlines-view
...
* Use lit-html
* Let it look and behave similarly to other list views in the controlbox
2020-01-30 19:37:00 +01:00
JC Brand
73fa24a844
headlines: move view code into converse-headlines-view.js
2020-01-30 18:18:27 +01:00
JC Brand
ed287df43a
No need to set id manually
2020-01-30 17:36:55 +01:00
JC Brand
29aed314c1
Remove Backbone
...
* Remove backbone as NPM deps and from docs
* Remove backbone stuff from webpack
2020-01-30 17:36:55 +01:00
JC Brand
fef92ad99e
oauth: Replace VDOMView with HTMLView
2020-01-30 17:36:55 +01:00
JC Brand
8b5227761e
Replace roster filter VDOMView with HTMLView
2020-01-30 17:36:55 +01:00
JC Brand
39f189b1d1
Use HTMLView for login form
2020-01-30 17:36:55 +01:00
JC Brand
30d08d2bfe
muc-views: Remove features section...
...
and replace with button to open invite modal
2020-01-30 17:36:55 +01:00
JC Brand
9fb2056753
Move MUC invite widget into a modal
2020-01-30 17:36:55 +01:00
JC Brand
c6ac03e94e
Fix linting errors
2020-01-30 17:36:55 +01:00
JC Brand
d32c4c1f61
muc-views: replace VDOMView with HTMLView
2020-01-30 17:36:55 +01:00
JC Brand
9fb2d279e9
Replace VDOMView with HTMLView
2020-01-30 17:36:55 +01:00
JC Brand
393a96cf02
roomslist: remove Backbone
2020-01-30 17:36:55 +01:00
JC Brand
c4b48d701f
bookmark-views: Changes templates to lit-html
2020-01-30 17:36:55 +01:00
JC Brand
d310f1e3e4
emoji-views: use lit-html for templating
...
* declare picker events in lit-html
* init intersection observer only once
* don't set value manually
* don't manually add classes
* avoid x-scrollbar and 'undefined' in search input
2020-01-30 17:36:55 +01:00
JC Brand
11e219dd41
Update copyright
2020-01-30 17:36:55 +01:00
JC Brand
ad93407907
Replace modal templates with lit-html components
2020-01-30 17:36:55 +01:00
JC Brand
a8104d7498
Add Skeletor as dependency
2020-01-30 17:36:55 +01:00
JC Brand
50e6c8a082
roster: refactor to use async/await
2020-01-30 17:36:55 +01:00
JC Brand
b08f5d355b
roster: avoid race-condition by waiting for contacts to be fetched
...
before creating any new ones
2020-01-30 17:36:55 +01:00
laszlovl
cde6b093c0
Fix incrementMsgCounter cleaning up after itself
2020-01-27 17:53:36 +01:00
Christoph Scholz
a472a0806e
show headline messages in controlbox
2020-01-23 11:32:15 +01:00
JC Brand
464c68a3b6
Fix typo
2020-01-22 15:58:28 +01:00
JC Brand
bda704901f
emoji-views: lazily render picker only once user clicks to open
2020-01-22 15:00:16 +01:00
JC Brand
f3472e1b9f
emoji: Add initialize
API method and call when chat view gets created
2020-01-22 13:20:59 +01:00
JC Brand
2f76397590
Bump timeout for rendering an image to 20secs
2020-01-21 15:39:35 +01:00
JC Brand
901f70272e
message-view: Re-use image element and fix autoscroll after image loads
2020-01-21 15:32:34 +01:00
JC Brand
685c9585f4
Fix linting error
2020-01-21 14:06:47 +01:00
JC Brand
234b273ca6
message-view: Add support for rendering Imgur URLs
2020-01-21 13:53:59 +01:00
JC Brand
b0a9782d31
emoji: Lazy load the emoji JSON
...
Only load it once the first chat has been opened.
2020-01-21 12:45:34 +01:00
JC Brand
d5472a8d23
muc-views: Use native methods instead of lodash
2020-01-21 11:46:39 +01:00
JC Brand
17ef50f662
muc-views: admins can also change the MUC subject
2020-01-17 14:50:25 +01:00
JC Brand
161cbec0d8
For forbidden
errors, show error message from server
2020-01-17 14:44:05 +01:00
JC Brand
b2a4ff7a85
muc-views: don't accept non-allowed commands
2020-01-17 13:56:58 +01:00
JC Brand
79cc160772
chatview: Make sure char counter is updated and textarea is focused
2020-01-17 12:53:45 +01:00
JC Brand
4bad10cd21
muc-views: Fix mess in previous commit
2020-01-17 12:17:06 +01:00
JC Brand
16d2fa3f48
muc-views: Don't show subject change message in new MUC
2020-01-17 05:36:07 +01:00
JC Brand
3d3d97e75b
Restrict /topic command to allowed users
2020-01-16 15:28:02 +01:00
JC Brand
aa86a8be32
muc: Store room configuration (e.g. disco#info fields
) on the MUC
...
This will make it easier to add config-based functionality, such as
allowing/showing the `/topic` slash command only to those users who are
allowed to set the subject.
2020-01-16 15:28:02 +01:00
JC Brand
929a00e1cd
Fixes #1836
2020-01-16 13:48:46 +01:00
JC Brand
d17ae811d7
More CSS and test fixes
2020-01-15 15:48:31 +01:00
JC Brand
f367157d75
Try to work around a Chromium flexbox bug.
...
The .chat-content are doesn't resize when the textarea gets resized to
its original size once a message gets sent.
2020-01-15 14:38:48 +01:00
JC Brand
17e9f5607d
Set meta and noscript tags
2020-01-15 11:40:40 +01:00
JC Brand
66d1a65432
Update chat head markup and CSS
...
- Use flexbox where possible
- Simplify header by using `justify-content` instead of setting column widths
- Show description below the row containing the title and buttons
2020-01-14 13:38:27 +01:00
JC Brand
9ce315dece
Bugfix. Handle stanza that clears the MUC subject
2020-01-14 10:07:23 +01:00
Christoph Scholz
40726e06e9
A user can now add himself as a contact
2020-01-13 10:30:00 +01:00
Christoph Scholz
e2d744ddc4
config option for roomid validation
2020-01-13 09:01:21 +01:00
JC Brand
496e5ba46d
Fix linting error
2020-01-13 09:00:08 +01:00
JC Brand
2a3ca93256
core: don't use Chrome-only check for web auth support
2020-01-12 01:35:44 +01:00
JC Brand
22ff93c3a7
core: Import individual lodash methods
...
and use some native ones instead
2020-01-12 01:08:37 +01:00
Christoph Scholz
d0ee41d4fb
focus now on jid field after controlbox is loaded
2020-01-11 23:26:36 +01:00
Christoph Scholz
36e56052bc
don't log error if user has no bookmarks
2020-01-10 21:12:59 +01:00
JC Brand
916e300a79
Updates #1313 and #1793 : Send button improvements
2020-01-10 15:40:46 +01:00
JC Brand
9c5fc2e4d3
Use package.json files to specify more precisely what gets packed
2020-01-10 13:29:42 +01:00
JC Brand
e866248227
Don't include vim temp-files in release tarball
...
and bump post-release version number
2020-01-10 13:04:05 +01:00
Christoph Scholz
7d94c712c8
notification is now clickable
2020-01-10 11:55:17 +01:00
JC Brand
cb68308d5b
Fix JSDOC comment
2020-01-10 09:04:54 +01:00
JC Brand
cd60614f88
Release 6.0.0
2020-01-09 17:15:43 +01:00
JC Brand
4f4b10d2a3
muc: initialize occupants early to avoid timing issues...
...
in converse-omemo which relies on `chatbox.occupants` existing in the
`add` handler.
2020-01-09 17:07:31 +01:00
JC Brand
ff799a41f6
emoji-views: handle navigator not being instantiated yet
2020-01-09 17:07:31 +01:00
JC Brand
9cbc15d4a6
Updates #1806
2020-01-09 15:01:37 +01:00
JC Brand
4018dd959e
Fixes #1764 : Incorrect URI encoding in references
2020-01-09 14:59:45 +01:00
JC Brand
2dae07fa87
Fixes #1791 : Adhere to the auto_focus setting
2020-01-09 14:28:43 +01:00
JC Brand
224f41ca8a
Remove autofocus
, it's bad for accessibility and mobile usability
...
See here: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-autofocus
2020-01-09 14:15:16 +01:00
JC Brand
158f3f0025
utils/html: expose more methods
2020-01-09 14:11:09 +01:00
JC Brand
ef1f16c186
Fixes #1767 : Remove JID so that credentials_url is called...
...
when the user logs out and then in again
2020-01-09 11:05:37 +01:00
JC Brand
72e6fb5ef0
Refactor rendering of OOB urls and images
...
- limit the number of instantiations of URI
- Handle try/catch of URI invoking in one place (`getURI`)
- Reduce exposed interface of utils/html.js by making some methods internal functions
2020-01-09 11:34:39 +02:00
Christoph Scholz
13652f6a6f
Errors caused by malformed URLs are now caught
2020-01-09 10:59:19 +02:00
JC Brand
6ad0426a7d
Fix linting errors
2020-01-08 12:27:17 +01:00
JC Brand
17654aaf40
emoji-views: incorporate tab-based navigation
2020-01-08 11:38:31 +01:00
JC Brand
e87db91e2d
dom-navigator: properly call static method.
...
emoji-views: Add scroll offset
2020-01-07 18:46:05 +01:00
JC Brand
b339f99cbf
minimize: Call initMinimizedChats
earlier
...
We don't need to wait until we have the user JID given that this is just
a view being instantiated.
2020-01-07 18:19:52 +01:00
JC Brand
0524352446
Fix linting errors and update changelog
2020-01-07 15:59:29 +01:00
JC Brand
995f2a9997
Add arrow navigation to the emoji picker
2020-01-07 15:47:05 +01:00
JC Brand
2b213d0561
log: properly log to the set level
2020-01-06 10:40:18 +01:00
Yaskhan
1653c1ae92
Update converse-mam.js
...
I think why do not come archives from group chats, and it turns out that you need to add "groupchat" in options. I spent half an hour searching in the documentation, and half an hour searching in the convers tests. And finally found in tests.
2019-12-26 15:56:04 +02:00
JC Brand
d8e561ef7e
Fix linting errors
2019-12-20 16:02:53 +01:00
JC Brand
0d8b3e1839
Fixes #1806 : Two file upload buttons appear in MUC
2019-12-19 17:29:33 +01:00
JC Brand
9b4276721c
Remove unnecessary await statement
2019-12-19 13:12:12 +01:00
JC Brand
da319604b6
Fixes #1735 : Chatboxes stay empty after logging out and in again
...
The problem was that the `emojisInitialized` promise was re-created upon
logout and then no longer resolved upon subsequent login.
The `_converse.api.promises.add` method now takes another parameter
`replace` which determine whether it should be replaced upon logout or
not.
The `emojisInitialized` promise will now not get replaced.
2019-12-18 16:09:44 +01:00
JC Brand
8b6c902c4c
Set VCards via events, thereby reducing coupling
...
- Rename `chatRoomOpened` event to `chatRoomViewInitialized`
- Rename `chatBoxInitialized` to `chatBoxViewInitialized` and trigger only for `ChatBoxView` instances.
- New event `headlinesBoxViewInitialized`
- Trigger the `chatBoxInitialized` event when a new `_converse.ChatBox` is opened.
2019-12-18 15:20:51 +01:00
JC Brand
c3102561f4
updates #1795 : Only download metadata for video files
2019-12-18 15:20:51 +01:00
JC Brand
c6c65749bb
rosterview: use push
instead of the non-existent append
2019-12-18 12:07:25 +01:00
JC Brand
a246aef823
muc-views: clear empty history indicator when inserting a date
2019-12-18 12:07:25 +01:00
JC Brand
b0e66232d3
Fixes #1253 : Show contacts with unread messages at the top of the roster
2019-12-18 11:42:26 +01:00
JC Brand
82b19173f1
rosterview: Import individual lodash methods
2019-12-17 14:38:12 +01:00
JC Brand
565283b8a3
rosterview: Let the default chat state filter be online
...
Also replaced some lodash methods with native ones.
2019-12-17 14:27:56 +01:00
JC Brand
03b7ae0a30
Improvements to how things are stored.
...
- Use the bare JID as indexedDB dataStore
- Collapse localStorage and indexedDB stores into one `persistent` store.
- When testing, only clear test data
2019-12-17 13:59:43 +01:00
JC Brand
4aa6b728cf
muc: wait for restoreSession
2019-12-11 16:20:08 +01:00
JC Brand
0f63c84d5b
core: properly clear cache in clearSession
...
Bump to latest backbone.browserStorage which adds the `clear` method
2019-12-11 15:44:56 +01:00
JC Brand
c379807d4c
muc: Move code into restoreSession
method
2019-12-11 10:06:26 +01:00
JC Brand
f3a1351a42
muc: loosen isJoined
criteria
...
Handle any `error` IQ result or timeout from a MUC ping as indication that we're no longer joined.
2019-12-11 10:06:03 +01:00
JC Brand
720087bef2
controlbox: remove unnecessary overrides
2019-12-11 08:38:28 +01:00
JC Brand
a4567ee075
muc: Store connection_status
in session storage
...
Otherwise we might run into a situation where a very old,
cached MUC that's being restored has `connection_status` set to ENTERED
(and the user happens to be in the MUC via another client)
and then restores cached messages without taking
`clear_messages_on_reconnection` into account.
2019-12-11 08:10:27 +01:00
JC Brand
09b085be6e
muc: no need to override tearDown
...
we already listen for `beforeTearDown` and do what's necessary there.
2019-12-11 08:10:25 +01:00
JC Brand
8125eaed57
chatboxviews: Remove ineffectual override
...
`initStatus` is no longer on the `_converse` object, so the override
wasn't being applied and chat boxes get closed when the
`clearSession` event fires.
2019-12-10 15:21:28 +01:00
JC Brand
306748feb0
muc-views: no need to set nickname before calling join
...
It was in any case setting the wrong key, should've been `nick`
2019-12-09 17:17:40 +01:00
JC Brand
3d3738f3be
muc: refactor MUC joining
...
We now distinguish more clearly between joining and re-joining a MUC.
The `enterRoom` method has been refactored away.
Instead, `join` or `rejoin` should be used, depending on the circumstances.
Don't fetch cached occupants in the `initialize` function, instead, only fetch
them if we're restoring a MUC that we're still connected to.
If we're not restoring a still-connected MUC, then we clear the
occupants cache, and the messages cache if `clear_messages_on_reconnection` is `true`.
updates #1807
updates #1808
2019-12-09 17:17:33 +01:00
JC Brand
7bf39a092f
muc: move message handler into own method
2019-12-06 13:09:09 +01:00
Dele Olajide
890db3427f
Handle message notifications about affiliation change for users not in a room
...
See https://git.happy-dev.fr/startinblox/components/sib-chat/issues/96
2019-12-06 12:55:07 +01:00
JC Brand
c646879cca
Ping the server when the tab becomes visible
2019-12-06 10:57:52 +01:00
JC Brand
5b507ec74e
muc: check that we're still connected if the tab becomes visible
...
Otherwise Converse might only realise we're no longer in the room when
the user tries to interact with it.
2019-12-05 22:29:37 +01:00
JC Brand
7866247f5d
dragresize: Unregister global event handlers
2019-12-05 21:02:06 +01:00
raphaelSeguin
97b8ecbbdf
Display status avatars in the occupants list
2019-12-05 14:13:52 +01:00
JC Brand
b1c9af3ed0
Various improvements to resizing of occupants view.
...
- Remove need for the `converse-mouse-events` plugin.
- Register `mousemove` and `mouseup` handlers only when necessary and only inside the MUC DOM element.
- Restore converse-dragresize to roughly it's original state before work started on this.
- Move `applyDragResistance` to utils.
updates #1640
2019-12-05 09:32:48 +01:00
JC Brand
0c4da63e07
Merge branch 'pullRequest_SkalierungTeilnehmerListe' of github.com:worlword/converse.js
2019-12-04 14:55:47 +01:00
JC Brand
115abdda27
muc-views: pass all model attributes to template
...
Makes it possible to show a validation message in a downstream
application.
2019-12-03 15:02:37 +01:00
JC Brand
dffe3d1a26
smacks: Set enable_smacks
to true
as default
2019-12-03 13:54:28 +01:00
JC Brand
c3447dd205
New config option: `persistent_store
`
...
Allows for using IndexedDB as the persistent store, instead of localStorage
2019-12-03 13:51:57 +01:00
JC Brand
5232019ed7
roster: Replace lodash methods with native ones
2019-12-03 12:37:26 +01:00
JC Brand
7fc3151e56
Fixes #1783
2019-12-03 11:31:28 +01:00
JC Brand
9bff567b3c
Fixes #1796
2019-12-03 10:57:01 +01:00
JC Brand
f1e1e538b6
muc-views: Wait for messages to be fetched
...
Also, insert occupants sidebar before inserting the chat into the DOM
2019-12-02 14:00:21 +01:00
JC Brand
099603ed8b
chatview: Reduce debounce time for markScrolled from 100ms to 50ms
2019-12-02 13:59:58 +01:00
JC Brand
fc42f2903c
muc-views: enterRoom should be called on the model
2019-12-02 13:45:35 +01:00
JC Brand
d2cf29bce4
muc: One more place to fetch messages
...
When restoring an already entered room from cache.
Otherwise we end up with an empty history.
2019-11-29 17:04:54 +01:00
JC Brand
1c116b0385
mam: distinguish between messages fetched before and after MUC join
2019-11-29 16:17:48 +01:00
JC Brand
a9128808de
muc: Re-render the bottom panel once we enter the MUC
...
Otherwise we end up with no textarea when rendering a MUC that starts
with connection_status of entered but which then needs to reconnnect.
2019-11-29 16:17:28 +01:00
JC Brand
53ced8c763
muc: Don't restore messages from cache...
...
if we're just going to clear them again
This avoids flashing of messages followed by a spinner.
2019-11-29 09:58:38 +01:00
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
ndoell
b94e5653a9
Add resize functionality to occupants-list in MUC.
...
This adds the ability to resize the MUC-Member-List in all MUCs. The
MUC-Member-List can be scaled between 20% width of the MUC and 75% of
the MUC.
2019-11-13 19:39:35 +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
JC Brand
b70fde159d
Fixes #1738 . Allow webpack's publicPath
to be specified at runtime
2019-10-06 21:52:37 +02:00
JC Brand
5c532e3b92
Build po files and add Vietnemese as available language
2019-10-06 21:52:09 +02:00
JC Brand
fdb24122c0
chatboxes: clear messages when in untrusted mode
2019-10-04 17:47:57 +02:00
Christoph Scholz
1c7c25091f
new config option: allow_message_corrections
2019-10-04 15:42:38 +02:00
JC Brand
43935a9e56
controlbox: replace lodash methods with native ones
2019-10-04 14:53:20 +02:00
JC Brand
463caf36a1
bookmarks: silently remove bookmarks when clearing the session
2019-09-26 16:43:26 +02:00
JC Brand
0895abf3e4
chatboxes: Replace lodash methods and only import what's necessary
2019-09-26 15:21:47 +02:00
JC Brand
44e5b4c947
bosh: only advertise support if the module is enabled
...
updates #1725
2019-09-24 15:42:13 +02:00
Christoph Scholz
bce8dc9113
Fixes #1714
...
don't notify if only message delivery receipt
2019-09-24 13:27:49 +02:00
Christoph Scholz
cd5dacbe29
Process stanzas from mam one-by-one
2019-09-21 13:26:36 +02:00
JC Brand
51b818f916
smacks: Also check for BOSH to determine support
2019-09-20 12:06:43 +02:00
huang.xinghui
9291dfc918
Update package.json
...
fix: fixed main file path
2019-09-17 11:33:57 +02:00
JC Brand
8574f66954
Don't hardcode roster filter to localStorage
2019-09-17 10:49:02 +02:00
JC Brand
e377c9bd6f
Fixes #1712
2019-09-16 14:04:28 +02:00
laszlovl
ab9b2d64ab
Fix incorrectly detecting every message with a duplicate ID as correction
2019-09-16 13:07:14 +02:00
JC Brand
9d52b16b58
Set new dev version
2019-09-13 16:05:18 +02:00
JC Brand
39896b508b
Release 5.0.3
2019-09-13 15:19:00 +02:00
JC Brand
bdf4f3f536
Bump npm and lodash
2019-09-13 13:38:20 +02:00
JC Brand
68e34351ed
Reject unencapsulated forwarded messages
...
since we don't support XEP-0297 on its own
2019-09-13 13:05:21 +02:00
JC Brand
37d052ad9e
Verify that Converse is not susceptible to CVE-2015-8688
...
https://gultsch.de/gajim_roster_push_and_message_interception.html
2019-09-12 19:46:09 +02:00
JC Brand
c6f3da5887
Clean up test
2019-09-12 19:15:13 +02:00
JC Brand
d58380af83
Provide more info in error message
2019-09-12 12:51:20 +02:00
JC Brand
5afe8629cd
Remove mistakenly pasted jsdoc snippet
2019-09-12 12:48:09 +02:00
JC Brand
a6b7d0d972
Emit chatBoxFocused
and chatBoxBlurred
events for emoji picker input
2019-09-12 11:05:27 +02:00
JC Brand
5bf0955193
Release 5.0.2
2019-09-11 17:44:38 +02:00
JC Brand
35e97c2353
Ignore MAM chat
messages not sent from yourself
2019-09-11 14:18:21 +02:00
JC Brand
0af9bc8ffc
Fixes #1704
...
Ignore carbon groupchat messages
2019-09-11 14:18:21 +02:00
Licaon_Kter
a69ebcbdf6
Capitalize "groupchat" ( #1707 )
...
* Capitalize "groupchat"
* Also locale
* Also muc spec
2019-09-11 14:17:23 +02:00
JC Brand
26c1dbb0eb
Updates #1705 . Add getRoomsPanel
method to avoid dangling pointer
2019-09-11 11:28:28 +02:00
GRUNBLATT Remy
d0b6e8fd16
Update Oauth login to current API format
2019-09-11 11:09:12 +02:00
JC Brand
e305cc35b0
Remove --larger
class on a edited message that's no longer just emojis
2019-09-10 16:54:32 +02:00
JC Brand
54c90e146e
Replace lodash methods with built-ins
2019-09-10 15:47:30 +02:00
JC Brand
1a7b7f1bea
modtools: fix typo
2019-09-09 12:10:44 +02:00
JC Brand
3fee5540a0
modtools: Also allow querying and setting no affliation
2019-09-09 11:25:46 +02:00
JC Brand
2ec70adc5d
modtools: Add help text to explain roles and affiliations
2019-09-09 11:02:14 +02:00
JC Brand
90ef4b0c9d
Don't let non-mods open the modtools modal
...
Bugfix: fall back to nick if the JID is not available.
2019-09-08 00:15:05 +02:00
JC Brand
768ed4a577
Replace lodash methods with built-ins, convert docstrings to JSDoc
2019-09-07 23:14:33 +02:00
JC Brand
46ccc1a87f
Fixes #1692
2019-09-06 16:14:30 +02:00
JC Brand
cc91f3751e
Add listenTo
instead of on
to avoid memory leaks
2019-09-06 16:04:06 +02:00
JC Brand
d9c1bbf95b
updates #1691 : Use listenTo
...
so that we have automatic event deregistration when the model gets removed.
2019-09-06 13:10:37 +02:00
JC Brand
dfafbefb71
emoji-view: insert partially matched emoji on enter
...
if it's the only search hit.
2019-09-05 16:22:57 +02:00
JC Brand
f52ade1193
emoji-views: don't iterate over all emojis if...
...
new search term includes the previous one
2019-09-05 16:17:59 +02:00
JC Brand
bf599f39ff
emoji-views: reinitialize intersection observer upon rerender
2019-09-05 15:29:30 +02:00
JC Brand
01468fc087
converse-emoji: Sort search results
...
Also, don't show the categories while searching.
2019-09-05 14:49:06 +02:00
JC Brand
60f04bc915
converse-emoji: Avoid dangling pointers to removed category DOM elements
2019-09-05 14:07:25 +02:00
JC Brand
4015eb2fd1
Name anonymous function to fix failing test
2019-09-05 13:12:34 +02:00
JC Brand
b5c56c8323
Add getFullname
to XMPPStatus model and use that
...
instead of returning the fullname as fallback in `getNickname`
2019-09-05 12:49:10 +02:00
JC Brand
5f5de90f0c
MUC: Don't set a default nick
...
We first want to check whether the user has registered a nick with the
MUC, and if so, that will be set as the nick.
2019-09-05 10:49:06 +02:00
JC Brand
c8f0fd2a7f
Refactor cleaner separation between converse-vcard and other plugins
2019-09-05 10:49:06 +02:00
JC Brand
3f0d88e88d
Fix ids for the modtools modal
2019-09-04 15:18:51 +02:00
JC Brand
cf7d2fb648
Add webpack.nodeps.js
...
Use it to generate dist/converse-no-dependencies.js which we use to
generate the converse.pot file.
2019-08-23 21:36:27 +02:00
JC Brand
93de11d167
Dynamically load the dayjs translation.
...
Also, remove the Promise polyfill. We don't support browsers which don't support promises.
2019-08-23 14:03:52 +02:00
JC Brand
9f054dd767
Update webpack config
...
- hot reloading
- split config into dev and prod
2019-08-23 13:29:26 +02:00
JC Brand
76f2b66445
Add a po loader for webpack.
...
- Removes the need for generating and keeping json files
2019-08-23 11:42:37 +02:00
JC Brand
8aaf50d58c
Use webpack's dynamic imports feature for fetching emoji JSON
2019-08-23 09:18:10 +02:00
JC Brand
d619012b6b
Emojis: Fix failing tests
2019-08-23 07:05:00 +02:00
JC Brand
bb0670c6b2
converse-emoji-views: tweak threshold values
2019-08-22 16:26:10 +02:00
JC Brand
3b40f6964f
Update Emoji JSON
...
* Order by category
* Set odering pre category (instead of just showing them alphabetically)
2019-08-22 16:21:27 +02:00
JC Brand
c01d110501
Avoid interference between username and emoji autocomplete
2019-08-22 14:30:02 +02:00
JC Brand
a59510bbf0
Highlight relevant category when scrolling
2019-08-22 13:56:47 +02:00
JC Brand
2c48096664
Add new spec with emoji tests
2019-08-22 13:56:47 +02:00
JC Brand
e4dc9fa820
Open emojis popup when TAB is pressed on a word starting with :
2019-08-22 13:56:47 +02:00
JC Brand
9099ef89fa
Close emoji popup after insertion
2019-08-22 13:56:47 +02:00
JC Brand
73c8002b76
Add search bar for emojis
2019-08-22 13:56:47 +02:00
JC Brand
13d419102a
converse-emoji-views: Show categories in chosen skintone
2019-08-22 13:56:47 +02:00
JC Brand
1cf9a936a4
Move Views associated to emojis into a new plugin
2019-08-22 13:56:47 +02:00
JC Brand
d7ce231c51
Various emoji improvements:
...
* Add emoji tooltip
* Make categories configurable and add smileys category
* Rearrange emoji categories and style
& Show all emojis together
2019-08-22 13:56:47 +02:00
JC Brand
4cb9fd88a8
Refactor emojis so that JSON is fetch asynchronously
2019-08-22 13:56:47 +02:00
Dele Olajide
4e440b0325
Update converse-chatboxes.js
2019-08-19 09:16:19 +02:00
Dele Olajide
f6c5f167f8
Fix Issue #1679
...
This fix forces Converse.js to respect auto_join_rooms and allow auto join room to occur with server-side generated random room names as required for XEP 0142 - workgroup queues
2019-08-19 09:16:19 +02:00
JC Brand
c9c689aec7
Docstring fixes
2019-08-16 15:44:58 +02:00
JC Brand
4291a45631
Postrelease
2019-08-14 13:15:16 +02:00
JC Brand
8f571ff148
Release 5.0.1
2019-08-14 12:56:44 +02:00
JC Brand
bcc73fe727
converse-muc: occupantAdded
promise has been removed
...
Also:
* converted two docstrings into JSDoc format
* Don't use `_.isNull`
2019-08-14 12:14:02 +02:00
JC Brand
9c024757b6
Bugfix: TypeError: o.getAttribute is not a function converse-chatview.js
...
can cause messages to not appear.
* Check against null not Element.
* Avoid iterating over non-Element nodes
2019-08-14 12:10:32 +02:00
JC Brand
3faaf6a62b
converse-muc: Fetch messages in the initialize method
...
Lately we've been fetching messages only after entering the MUC, so that
we already have occupants to attach to them (due to `fetchMembers` being
called before) and thereby avoid rerenders.
I've now moved message fetching into the `initialize` method and added
missing event handlers for attaching/removing the occupant from a
message as it comes online or goes offline.
We still avoid (some) rerenders because we fetch and wait for cached
occupants before fetching cached messages and we wait for `fetchMembers`
before triggering `enteredNewRoom` which causes MAM messages to be
fetched.
2019-08-14 11:08:05 +02:00
JC Brand
fa59b22f93
converse-message-view: Move methods from view to model
2019-08-13 15:34:59 +02:00
JC Brand
21a9ea7365
converse-message-view: Add hooks before/after message text transformations
2019-08-13 15:31:05 +02:00
JC Brand
502d2aa064
converse-message-view: Refactor to not use _.partial or _.flow
2019-08-13 11:46:51 +02:00
JC Brand
89ac4a6969
Show error message with option to retry when MAM query times out
2019-08-13 11:08:03 +02:00
JC Brand
cb10c28082
modtools: Test that error renders when not allowed to fetch affiliation list
...
Also fix scrolling bug
2019-08-12 12:45:12 +02:00
JC Brand
c490ba212d
converse-muc: Avoid refetching messages from cache
...
We want to fetch messages from cache only once. For one-on-one chats
this is the case because messages are fetched only in the `initialize`
method.
This used to be the case for MUCs as well, until we added the option
`clear_messages_on_reconnection`.
Now we only fetch messages after the user has entered the MUC.
2019-08-10 18:47:49 +02:00
JC Brand
e45bd5fc36
converse-roomslist: Handle bookmark not existing
2019-08-10 14:12:20 +02:00
JC Brand
02e50ca3a3
converse-mam: Don't fetch MUC MAM messages on chatReconnected
event
...
By this time the cached messages are not yet fetched, causing the entire
MAM archive to be queried.
2019-08-10 14:12:20 +02:00
JC Brand
ea123e9713
Handle IQ timeouts
...
* converse-muc: Handle timeout while fetching affiliation list
* converse-omemo: Handle IQ timeout
2019-08-10 14:12:02 +02:00
JC Brand
a407aff33c
converse-ping: Refactor and update to reconnect upon ping timeout
2019-08-10 12:26:07 +02:00
JC Brand
aa9aad918f
Handle case where bookmark doesn't exist for some reason
2019-08-10 12:06:01 +02:00
JC Brand
aee6a192d1
Add a new command /modtools
...
in which you can set user affiliations and roles.
Also, let getAffiliationList return an Error instead of `null` if you're
not allowed to fetch a particular affiliation list.
2019-08-09 23:30:14 +02:00
JC Brand
a03e722a24
Add new dev version
2019-08-09 00:58:43 +02:00
JC Brand
bc27b3a36a
Release 5.0.0
2019-08-08 18:13:12 +02:00
JC Brand
1bbe52f71c
Fixes #1670
...
Set converse-profile as dependency of converse-omemo
2019-08-08 16:20:55 +02:00
JC Brand
bea073a5a2
Fix erroneous "is no longer an admin/owner" messages in MUCs
...
Don't remove affiliation for occupants if we weren't allowed to
fetch that particular affiliation list.
Previously, if fetching the list failed, we would return an empty array,
which would imply that the affiliation list is empty and that all
users with the given affiliation should have their affiliations removed.
Instead we now return `null` and properly account for that when setting
affiliations on existing contacts based on the returned member lists.
2019-08-08 16:19:04 +02:00
JC Brand
ade6266de8
Update backbone.overview and strophe.js
2019-08-08 12:45:17 +02:00
JC Brand
720096726d
converse-chatboxes: Don't refetch chatboxes upon reconnection
...
We don't remove the existing chatboxes and upon refetching they
become stale and get removed (by Backbone) and then the UI for
them becomes unresponsive.
2019-08-07 16:12:51 +02:00
JC Brand
c0ef008c4a
converse-bookmarks: Call _converse.Collection.prototype.clearSession
2019-08-07 16:12:21 +02:00
JC Brand
b176161ecf
converse-roster: Reconnection bugfixes.
...
Don't remove cached presences in `afterTearDown` event.
We might reconnect again and resume the session, in which case we need
that data still.
Instead, we remove cached presences when `clearSession` fires, because
then we know we're not reconnecting.
When reconnecting, we don't fetch presences from cache, we still have
them (since we no longer remove them in `afterTearDown`).
When reconnecting and not resuming, we clear the presences from cache,
since we're starting a new session.
2019-08-07 16:11:36 +02:00
JC Brand
3dc2b2b695
Bugfix. List of messages need to be passed to api.alert.show
2019-08-07 12:20:20 +02:00
JC Brand
11d8450577
Add note to translators to avoid confusion
2019-08-07 10:52:20 +02:00
JC Brand
dfe8194072
Show spinner when fetching messages by scrolling upwards
2019-08-07 10:47:11 +02:00
JC Brand
271a871a51
Updated i18n po, pot and json files
2019-08-07 10:28:49 +02:00
JC Brand
5cb5ec4640
Fixes #1668 . MUC MAM blocked by "info" messages
2019-08-06 23:30:02 +02:00
JC Brand
7bfb172f6e
Updates #1548 . MAM paging improvements.
...
* Explicit forwards and backwards paging
* Include upper or lower bound when calling `RSM.prototype.next` or `RSM.prototype.previous`
* Bugfix: Don't override new RSM parameters (caused infinite recursion)
2019-08-06 22:54:51 +02:00
JC Brand
0d2c36dca6
converse-muc: use minimized attr instead
2019-08-06 13:32:52 +02:00
JC Brand
8864925407
Bugfix. Make sure new attrs are applied.
2019-08-06 13:07:41 +02:00
JC Brand
bda567ca01
Fix linting errors
2019-08-05 11:26:48 +02:00
JC Brand
db550b3ec7
Rename controlboxInitialized
to controlBoxInitialized
...
to conform to conventions
2019-08-05 11:10:39 +02:00
JC Brand
ef5ecb2f3a
Decouple converse-controlbox and converse-profile
2019-08-05 11:07:38 +02:00
Réda Housni Alaoui
edcb8e28c2
Fix #1664 Blacklisting converse-profile makes the control box totally blank
2019-08-05 11:01:39 +02:00
JC Brand
d90bcd5274
Combine two versions of isOnlyChatStateNotification into one
...
Also fix a bug in the code dermining whether an XMLElement stanza is only a chat state notification
2019-08-05 10:58:38 +02:00
JC Brand
7a590f7c22
Stop using certain lodash methods.
...
* _.isNil
* _.noop
* _.isNull
2019-08-05 10:56:22 +02:00
JC Brand
78c7ded2e5
converse-disco: Catch and report errors that happen during tests
2019-08-05 10:33:00 +02:00
JC Brand
021143d6ac
Bugfix. Don't clear roster when tearing down
...
We do that in `clearSession` and otherwise when we auto-reconnect we end
up without a roster.
2019-08-04 01:38:41 +02:00
JC Brand
7861ed7b54
Fixes #1403 : Rename show_chatstate_notifications
...
to `show_chat_state_notifications`
2019-08-03 21:52:14 +02:00
JC Brand
8a9a0a4b19
Add support for paging through MAM results when catching up
...
Fixes #1548
2019-08-03 21:44:02 +02:00
JC Brand
c7b6bb4773
Only clear messages when clear_messages_on_reconnection
is true
2019-08-03 21:43:06 +02:00
JC Brand
c038794fb5
converse-mam: Light refactoring and cleanup
2019-08-03 21:43:06 +02:00
Réda Housni Alaoui
c2db667321
Shadow dom: TypeError: Cannot read property 'parentElement' of null caused by MinimizedChatsToggleView
2019-08-02 16:30:25 +02:00
JC Brand
5f0a0138a0
Finegrained config of XEP-0095 CSNs for MUCs as well
2019-08-02 12:05:19 +02:00
JC Brand
ec85490f1c
Allow configuration of which XEP-0095 CSN's may be sent out
2019-08-02 11:34:24 +02:00
JC Brand
550d0ae31b
Bugfix. Chat state should be set to active on chat maximized
2019-08-02 11:15:17 +02:00
JC Brand
6dbc0a0637
converse-dragresize: Remove the resize event listener
2019-08-02 10:47:05 +02:00
JC Brand
3b29e5754d
Don't unnecessarily fetch the roster
...
If we've fetched the roster before within this session, then we don't
have to do so again, regardless of whether versioning is supported or
not, otherwise, even if we have a cached roster, we still need to get
the latest one again.
2019-08-02 10:46:30 +02:00
JC Brand
d5ed1bfafe
Remove the coupling between converse-controlbox and converse-rosterview
2019-08-02 09:12:04 +02:00
JC Brand
0b43082383
Add check and update changelog
2019-08-01 16:26:29 +02:00
JC Brand
cd392bb197
Fixes #1561 Don't clear localStorage and sessionStorage
2019-08-01 11:34:14 +02:00
JC Brand
1bc9a7f809
Ensure JID is set when userSessionInitialized
triggers.
...
Otherwise `converse.features` cache id contains `null` instead of the
user JID and it doesn't clear correctly.
2019-08-01 08:57:34 +02:00
JC Brand
f0f7cfab42
Make the chatbox messages cache key overridable
2019-07-31 17:19:50 +02:00
JC Brand
5b64b5a0e3
The locales URL should be absolute
2019-07-31 16:13:33 +02:00
JC Brand
1eb2364336
Let sendMessage
return the message model, not just the text
2019-07-30 16:15:47 +02:00
JC Brand
afa2543492
Honour the auto_login
flag
...
by not logging in automatically when `auto_login` is `false` and we're
using anonymous, external or prebind authentication.
For `authentication` set to `login` the situation is much more
ambiguous, since we don't have a clear distinction between wether we're
restoring a previous session (`keepalive`) or whether we're
automatically setting up a new session (`auto_login`).
So currently if *either* `keepalive` or `auto_login` is `true` and
`authentication` is set to `login`, then Converse will try to log the
user in.
2019-07-29 16:35:17 +02:00
JC Brand
f12c024b99
Don't query MAM upon every page load.
...
Instead we should only query for newly created chats.
2019-07-29 15:41:03 +02:00
JC Brand
8bd72eed72
Don't keep on refetching roster if the service is unavailable
...
`sendIQ` now takes a flag to turn of rejection of the promise and to
resolve on error IQs instead.
2019-07-29 14:33:37 +02:00
JC Brand
bdbcec65c6
Update JSDoc strings. Combine two methods
2019-07-29 11:36:37 +02:00
JC Brand
aa30e4d9e8
Bugfix. Don't unnecessarily fetch roster again when it's empty
2019-07-29 11:20:33 +02:00
JC Brand
e20b654876
Stop using _.isUndefined
2019-07-29 10:32:29 +02:00
JC Brand
caad85f45b
Manually remove BOSH session tokens from cache
...
even if the `_converse.bosh_session` instance does not exist.
We do this to avoid trying to reconnect with stale tokens upon
reconnection. Especially relevant for anonymous connections, but could
also be applicable when switching between websocket and BOSH connections
when reconnecting.
Also renamed `startNewBOSHSession` to `startNewPreboundBOSHSession`
2019-07-29 10:08:38 +02:00
JC Brand
f9cc51b28a
Bugfix. Make sure that restoreBOSHSession
is always called
...
I.e. also when we're reconnecting.
Otherwise the `_converse.bosh_session` object doesn't get recreated and
we don't cache the BOSH tokens.
2019-07-29 10:05:31 +02:00
JC Brand
179c0810c7
Prioritise logging in with credentials_url...
...
above logging in with passed in JID and password, since the password
might be an expired token.
2019-07-26 20:03:32 +02:00
JC Brand
778b4ff131
Bugfix. Fix check for debounced reconnection
2019-07-26 20:02:56 +02:00
JC Brand
5a48f3da23
Clone auto_join_rooms values before passing in
...
otherwise values get tacked on, causing problems when reconnecting.
2019-07-26 19:30:01 +02:00
JC Brand
6dd4fc5234
Tear down previous session when reconnecting anonymously
...
Because when we reconnect anonymously, we get a new JID, so it's as if
it's a completely new user.
2019-07-26 19:29:01 +02:00
JC Brand
a1d7076e93
Let initConnection wait for for _converse.api.login
...
So that the BOSH connection will be restored before we trigger `connectionInitialized`
2019-07-26 18:57:28 +02:00
JC Brand
fd4ba89182
Reconnect when an anonymous connection drops or fails.
2019-07-26 18:50:19 +02:00
JC Brand
ea36d53f78
Re-add the keepalive
options.
...
It's unlikely that `keepalive` needs to be set to `false`, but there are
some edge cases where it might be useful.
Here's a breakdown of the different configurations of `keepalive` and `auto_join`:
---
* auto_login: false, keepalive: true
This is the default config. Users need to log in manually, but then
Converse will try to reconnect them when the page reloads.
* auto_login: true, keepalive: true
Also very popular configuration. Used with `credentials_url` or `prebind_url`.
* auto_login = `true`, keepalive = `false`
Not sure what this could be useful for. No currently known application.
* auto_login = `false`, keepalive = `false`
Useful when you want some kind of specific action to trigger login, but
you don't want to maintain that state across page reloads.
Also relevant when using a websocket connection with anonymous login.
With websocket it's impossible to maintain anonymous sessions across page
reload because the the session gets removed server-side as soon as the
websocket connection drops and the server won't accept a full JID with
password for an anonymous connection anyway (which could happen upon
page reload when Converse tries to login in again if `keepalive` was `true`).
2019-07-26 18:08:38 +02:00
JC Brand
b6b085189b
Attempt to restore BOSH session or auto_login before...
...
triggering connectionInitialized.
That way, when listening for `connectionInitialized`, we'll know when it
fires whether we've attached to a BOSH connection or not.
2019-07-26 16:43:35 +02:00
JC Brand
c4ad02d4e3
New config setting: muc_fetch_members
2019-07-26 13:32:21 +02:00
JC Brand
c5193be44b
Add postrelease
make recipe to show dev version number in app
2019-07-25 13:45:51 +02:00
JC Brand
fa2d6cca10
Update developer documentation and buildout dependencies
2019-07-25 12:33:46 +02:00
JC Brand
2546622da3
Trigger events when resizing starts
2019-07-25 06:46:05 +02:00
JC Brand
45e19acfb1
Use cursor: pointer
instead of href="#"
2019-07-24 14:09:53 +02:00
Stanislav
d9e0b63683
Fix: use JID from credentials when credentials_url is set ( #1638 )
...
* Fix: async SetUserJID
2019-07-23 15:26:46 +02:00
JC Brand
643c40f260
Respect auto_login
after finishInitialization
.
...
If `auto_login` is false, we shouldn't log in, so we only try to log in when
it is true. Otherwise we still try to restore the BOSH session (if applicable).
2019-07-23 11:51:51 +02:00
JC Brand
18a2c8858a
Make attemptNonPreboundSession
and autoJoin
functions
...
rename `autoJoin` to `connect`
2019-07-23 10:19:15 +02:00
JC Brand
e4eafe9e91
Simplify attemptNonPreboundSession
...
- Split between `login` auth and the rest (`external`, `anonymous`, `prebind`)
- It doesn't make sense to pass along credentials when not using `login` auth so avoid that flow.
- It's not necessary to pass the `reconnecting` flag to `attemptNonPreboundSession`
2019-07-23 10:18:47 +02:00
JC Brand
9be43ccea7
Don't inform of role change which accompanies an affiliation change
...
given that it's implicit and can cause confusion
2019-07-22 18:45:30 +02:00
JC Brand
bcbff1b024
Don't assume user had voice before
2019-07-22 16:51:44 +02:00
JC Brand
07f82d6a0d
Allow passing of more options to auto_join_rooms
2019-07-22 15:10:59 +02:00
JC Brand
3817f471a0
Two session related fixes.
...
* Don't set JID resource when logging in anonymously. The resource will be set by the server.
* Don't wipe the `id` from the session when clearing it.
2019-07-22 14:43:30 +02:00
JC Brand
2fca442f57
Also render bottom panel when own occupant is added
...
So that we can remove the textarea if we're a visitor in a moderated room.
2019-07-12 13:50:39 +02:00
JC Brand
38d1e4e3d2
Bugfix. Sometimes when trimming chats, minimized chats go off screen
2019-07-12 12:50:20 +02:00
JC Brand
2849adf857
Stop debouncing show
...
Instead optimize in other ways.
Also:
- Don't fade in when `animate` is false.
- `trimChats` now gets called in `afterShown`.
- Add now event `beforeShowingChatView`
2019-07-12 12:42:41 +02:00
JC Brand
3a2bf766a0
Add new test utility waitUntilBookmarksReturned
2019-07-12 10:38:07 +02:00
JC Brand
06717370f1
Provide a traceback when waitUntil
times out
2019-07-11 23:42:26 +02:00
JC Brand
a1630b5c1f
Replace wait-until-promise with utility method
...
and bump default timeout
Also let `_converse.api.waitUntil` use it if a function is passed in.
2019-07-11 23:34:27 +02:00
JC Brand
8a98ef87fe
Various small fixes. (Unused imports, unused vars etc).
2019-07-11 12:37:17 +02:00
JC Brand
802f2b24f5
converse-muc: Update sendConfiguration
to not take callbacks
2019-07-11 11:01:51 +02:00
JC Brand
d95a7987ce
Fix linting errors and add @module
jsdoc directives
2019-07-11 10:48:52 +02:00
Malcolm
b016aa0f7d
FIX OEMO default setting in wrong place ( #1476 )
2019-07-11 09:11:22 +01:00
JC Brand
8938245cdd
Update various dependencies to their latest versions
2019-07-11 09:46:17 +02:00
JC Brand
8a405ee88c
Various bugfixes based on the previous refactoring.
...
These two commit should ideally be one, but I inadvertently pushed to
remote too early.
2019-07-10 16:55:55 +02:00
JC Brand
ded9945ed9
MUC: Don't send XEP-0085 CSNs when we don't have voice
...
Includes some refactoring:
- Don't send an `active` chat state notification when entering a MUC
I can't think of a good reason why this might be necessary or desired.
- Move `setChatState` form the view to the model
- Remove unused method `handleChatStateNotification`
- Don't store `role` and `affiliation` for the current user on the
ChatRoom object, but instead on the ChatRoomOccupant object representing
the user.
2019-07-10 14:24:00 +02:00
Malcolm
b163d05323
ADD Omemo default support ( #1476 )
2019-07-10 06:51:41 +01:00
JC Brand
a16c068313
Bugfix. Handle null
passed in as attrs
to api.rooms.create
2019-07-09 13:45:34 +02:00
JC Brand
168f29cf06
Only call credentials_url
when authentication
is set to login
...
Also update to newer strophe.js version which contains a bugfix.
2019-07-09 12:47:09 +02:00
JC Brand
5c88d3e836
Add role and affiliation classes to message DOM element
2019-07-08 13:58:15 +02:00
JC Brand
de1071bd4a
Add isModerator
method on the occupant model
2019-07-08 13:57:10 +02:00
JC Brand
216a67c165
Only show leave notifications when we're in the MUC
...
Otherwise when `removeNonMembers` gets called as we reconnect, we get a
long list of erroneous leave notifications.
2019-07-08 13:33:59 +02:00
JC Brand
6bfa69ab3b
Bugfix. Wait for members before fetching messages
2019-07-08 13:23:56 +02:00
JC Brand
3ca6ac7f50
Fixes #1524 Don't include own device in OMEMO message
...
This change reverts the significant part of 1dfdb36d20
I can't say that I understand why libsignal throws `Error: Invalid signature`
when you try to build a session for your own (sending) device, but given that
messages can only be decrypted once, I guess it isn't really necessary
to encrypt for your own device, since you already have the plaintext.
In addition I've added some error handling so that we can recover
gracefully when session building fails for a subset of devices.
2019-07-05 19:21:05 +02:00
JC Brand
1c50d4d7a1
Bugfix. Numbers aren't delineators for mentions
2019-07-04 08:28:12 +02:00
JC Brand
f17edee827
Bugfix. Should be possible to kick/ban/etc without providing a reason
2019-07-04 08:28:12 +02:00
JC Brand
89ef9a18c4
Call destroy
for the models instead of remove
on the collection
...
So that the models get removed from the browser cache.
Otherwise they get re-fetched when we reconnect.
2019-07-04 08:28:12 +02:00
JC Brand
e5188d8b10
Bugfix. Remove affiliation based on updated members lists
2019-07-04 08:28:12 +02:00
JC Brand
da1d87648c
New config option clear_messages_on_reconnection
...
In some cases, it might be desirable to clear cached chat messages once you've
reconnected to the XMPP server.
For example, if you want to prevent the chat history from getting too long or
if you want to avoid gaps in the chat history (for example due to MAM not
returning all messages since the last cached message).
If you're using OMEMO, then you probably don't want to set this setting to
``true``. OMEMO messages can be decrypted only once, so if they then
subsequently get cleared, you won't get the plaintext back.
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
e7178fed31
Fetch messages after fetching members.
...
This is done to avoid unnecessary repaints and reflows (caused when a
message has already rendered and then an occupant is created and
attached to that message, cauring a re-render).
Related to #1266
2019-07-04 07:58:24 +02:00
JC Brand
cd6b5143c6
Create separate models for MUC messages and their container
2019-07-04 07:58:24 +02:00
Kim Alvefur
28b51f75ce
Support sending files from clipboard ( fixes #1585 )
2019-07-03 23:46:24 +02:00
JC Brand
0d75cc5235
Fixes #1622
...
Make selector more general because Ejabberd returns `error[type="modify"]` instead of `error[type="cancel"]`.
2019-07-01 17:59:02 +02:00
JC Brand
34a404eecc
URI encode query string values
2019-07-01 17:21:49 +02:00
JC Brand
63d258a00a
Use findWhere
when looking for only one instance
2019-07-01 17:21:47 +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
f1f641ce61
Makes more sense to destroy a message outside of showMessage
...
Also ensures that we don't trigger `messageAdded` for a destroyed
message.
2019-06-28 15:24:08 +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
836d3946e8
Ignore keycodes if meta key is also pressed
2019-06-27 16:09:11 +02:00
JC Brand
0d928edf7e
Disconnect MUCs when we don't have a resumable SMACKS session
2019-06-27 15:49:19 +02:00
JC Brand
ec68dc1cf0
Always set JID on the connection
...
So that the resource is passed along when we manually bind.
Related to bd81b89724
2019-06-27 15:19:48 +02:00
JC Brand
119966d902
Set flag to indicate user session is active
...
We then use this flag to determine whether we should use the values from
sessionStorage.
This appears to fix the problem I originally tried to fix in 607d798665
.
When "cloning" a tab (e.g. via middle-click), the `active` flag will be
set and we'll create a new empty user session, otherwise it'll be false
and we can re-use the user session.
2019-06-27 15:13:04 +02:00
JC Brand
8d9d0a1ef4
Revert "Store session per full JID"
...
This reverts commit 607d798665
.
Unfortunately this doesn't solve the issue because we have a
chicken-and-egg problem due to not knowing the resource beforehand.
So what happens after this change is that we never resume XEP-0198
sessions but instead always start a new one.
2019-06-27 15:11:14 +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
11da69b0d7
Use native methods instead of DayJS
...
Results in a 4x speedup
2019-06-26 17:52:48 +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
bd81b89724
Ensure current resource is bound when manually calling connection.bind
2019-06-26 13:48:10 +02:00
JC Brand
2cbc4aaa50
Fixes #1494 . Trim whitespace around messages
2019-06-26 10:59:56 +02:00
JC Brand
83bc851f20
Fixes #1455 . Updates #1619
...
Avatar didn't update a second time due to `canvas` element being expected
2019-06-26 10:24:27 +02:00
JC Brand
b69440f875
converse-smacks: Ensure default session values are set
2019-06-25 23:58:45 +02:00
JC Brand
c759112cf3
Fix failing test
2019-06-25 22:53:39 +02:00
JC Brand
607d798665
Store session per full JID
...
Otherwise we run into a bug where two tabs with Converse.js share the
same XEP-0198 SM-ID, causing both to go into a reconnection-loop as
the XMPP server switches XEP-0198 sessions between them.
This bug is due to a distinction in how sessionStorage behaves when you
open the existing site in a new tab (e.g. middle-click or
`target="_blank"), as opposed to creating a new tab
and then opening the site in that tab.
In the latter case, the newly created sessionStorage object is empty.
In the former, the contents of sessionStorage of the current page is
copied over to the new page!
2019-06-25 21:40:28 +02:00
JC Brand
54804b5b89
Performance fix. Only set height when necessary
2019-06-25 17:24:07 +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
1bc3f28e6f
Update refreshFeatures
...
Distinguish between getting an existing entity and
creating a new one.
When creating a new one, ensure that we don't fetch from the cache.
New API method for creating a disco entity.
2019-06-25 11:43:59 +02:00
JC Brand
1a23ec1462
Move line from parent method into showMessage
2019-06-25 11:43:59 +02:00
JC Brand
996a43792e
converse-mam depends on converse-rsm
2019-06-20 16:51:50 +02:00
JC Brand
29b6a6724d
Need to explicitly fetch messages now when restoring a MUC from cache
2019-06-20 16:36:26 +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
ac007bb527
converse-disco: don't replace a pending promise
...
I'm not sure how much this is an issue outside of tests, where we might
run into race conditions arising to the fact that we don't always
respond to every IQ stanza
2019-06-20 14:04:46 +02:00
JC Brand
c5309f9210
Add attributes to resolveable promise to detect its resolved state
2019-06-20 14:04:46 +02:00
JC Brand
c32070c9bb
Autocomplete fixes
...
- Fixes #1575 . Height not properly set on MUC invitation list
- Add new configuration setting: `muc_mention_autocomplete_min_chars`
- Bugfix. `min_chars` setting for MUC mentions wasn't having an effect
2019-06-19 15:01:30 +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
303a8b63af
Fixes #1495 . Mentions should always include a URI attribute
2019-06-19 09:35:39 +02:00
JC Brand
7455ce1b07
Fixes #1579 and fixes #1538
2019-06-19 09:24:44 +02:00
JC Brand
30d110434f
Bugfix. Properly resize textarea when text gets removed.
2019-06-19 09:03:52 +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
1dc73c1c31
For chatboxes, use the web storage determined by _converse.trusted
2019-06-18 16:46:55 +02:00
JC Brand
b2553a44e1
New configuration setting: auto_focus
2019-06-18 14:04:26 +02:00
JC Brand
536b42697c
Manually scroll down when switching fullscreen chats
2019-06-18 13:59:55 +02:00
JC Brand
4f67f352f5
Fix /${command}
parsing bug
2019-06-18 13:01:38 +02:00
JC Brand
6a419cc145
Bugfix. Properly insert error messages and spinner
...
now that messages appear in reverse order due to flexbox
2019-06-18 12:35:58 +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
21b0f2464d
Clear received
field for corrected messages
...
It gets populated again upon MUC reflection or chat marker
2019-06-17 12:14:31 +02:00
JC Brand
9c66302c4a
Bugfix. Error responses weren't being shown for corrections
2019-06-17 12:07:33 +02:00
JC Brand
19f6bce246
Message correction improvements. Updates #1142
...
Up and down arrows only serve as message correction shortcuts if the
textarea is empty.
This means that:
- Up arrow doesn't start correction of previous message if we're currently writing a message
- Down arrow doesn't erase currently written message
This is based on user-feedback and is also how Slack handles these
shortcuts.
2019-06-17 09:04:03 +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
de3099a9d8
converse-muc: Show <text>
content of error presences
2019-06-16 12:14:32 +02:00
JC Brand
1d6ee5bf58
No need to mention 'permanent'
2019-06-16 11:23:36 +02:00
JC Brand
a19e35d101
Use setTimeout instead of listening for animationend
...
For some reason the latter causes extreme lag when switching rooms
2019-06-14 13:46:53 +02:00
JC Brand
83201e7c02
Reconnection fixes.
...
When reconnecting with a new transport, we call setUserJID
so that a new resource is generated, to avoid multiple
server-side sessions with the same resource.
We also call `_proto._doDisconnect` so that connection event handlers
for the old transport are removed.
2019-06-14 12:00:49 +02:00
JC Brand
9635f53dad
converse-smacks: 2 bugfixes.
...
- Don't ever resume SMACKS stream when using BOSH
- Clear SMACKS session data when using BOSH
2019-06-14 12:00:49 +02:00
JC Brand
d3692755d0
Consolidate changed event handler that renders MUC heading
2019-06-14 09:27:10 +02:00
JC Brand
946394928b
Fixes #1601 Message corrections should get their own origin id
2019-06-13 16:31:02 +02:00
JC Brand
22bdccc775
Bugfix.
...
https://xmpp.org/extensions/xep-0198.html#resumption
The <resume/> element MUST include a 'previd' attribute whose value
is the SM-ID of the former stream and MUST include an 'h' attribute
that identifies the sequence number of the last handled stanza sent
over the former stream from the server to the client.
2019-06-13 13:54:58 +02:00
JC Brand
f3c4dbc344
Avoid unnecessarily sending out a presence stanza
...
- Set roster_fetched flag when we get an empty IQ[type="result"] stanza
- Set `restored` flag when resuming in converse-smacks
- Don't trigger change event when fetching xmppstatus values
- Removed two events, since we can just listen to `change` on `_converse.xmppstatus`.
2019-06-13 13:33:01 +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
ca4b509d87
Log MUC connection status
2019-06-12 10:55:01 +02:00
JC Brand
5362156731
While connecting, treat "modify" error as a disconnection event
2019-06-12 10:15:55 +02:00
JC Brand
73fd3d6a5f
Fade out ephemeral messages
2019-06-12 07:09:22 +02:00
JC Brand
9d3dfa831a
Fixes #1599
2019-06-12 06:40:53 +02:00
JC Brand
e1ca02d94a
converse-disco: don't call onInfo on undefined
2019-06-12 06:27:07 +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
970ba96ce1
Bugfix. Only create VCards for chat
and groupchat
messages
...
Other types of messages such as `error` don't necessarily have a JID
tied to them.
2019-06-11 14:05:30 +02:00
JC Brand
a0f0240b92
Don't set nick before confirmation that it was successful
2019-06-11 14:05:30 +02:00
JC Brand
d385452a7d
Use _converse.getDefaultMUCNickname
2019-06-11 14:05:30 +02:00
JC Brand
599f7596f6
Show policy violation errors to the user and make them ephemeral
...
Also, remove ephemeral messages after 10 seconds, not 20
2019-06-11 14:05:07 +02:00
JC Brand
3cc1b40aad
Apparently no model triggers showHelpMessages
anymore
2019-06-11 10:34:23 +02:00
JC Brand
dc0085bff3
All received MUC messages are "received" by definition
2019-06-06 16:17:51 +02:00
JC Brand
690052e1c2
Call setUserJID
when we get JID from credentials_url
2019-06-06 13:41:52 +02:00
JC Brand
789b47ddb3
Bugfix. Don't create view for chat which fails validation
...
Use-case is when an invalid MUC gets opened in singleton mode.
Without this fix a new chat with spinner appears, even though it
shouldn't.
2019-06-06 08:34:56 +02:00
JC Brand
a656750459
Only fetch presences when we're resuming an existing session.
...
updates #555
2019-06-05 11:47:23 +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
01fce55733
Add prettierx and tentatively use it for some formatting
...
I'm using prettierx, which is a fork of prettier so that we can have
spaces before the brackets in a function declaration.
I don't like how restrictive prettier is concerning its configuration
and formatting.
- it messes up some indentation in specs/
- it removes a second newline when I specifically want to have two
- it doesn't allow spaces before brackets in function declarations (hence prettierx)
- it adds spaces for function parameters with default values
None of this is configurable.
So auto-formatting is not turned on by default, but it might be a useful
tool in some cases.
Fixes an issue where indentation was off in converse-core.js, causing
vim-sleuth to wrongly indent by three spaces only.
2019-06-05 10:25:31 +02:00
JC Brand
085a4c6535
Small config fixes
...
- fix import path
- remove unnecessary lines in webpack config
- remove unused file
2019-06-04 20:35:09 +02:00
JC Brand
51f2ab9100
Fixes #1196 . Use alternative connection method upon connfail
2019-06-04 15:11:32 +02:00
JC Brand
297f3d9efb
The list of core plugins doesn't have to be an attribute of _converse
2019-06-04 14:27:25 +02:00
JC Brand
b57e3e49c1
Fixes #1330 . Missing room name in MUC invitation popup
2019-06-04 12:08:14 +02:00
JC Brand
b128286410
Don't disconnect MUC on unload when using SMACKS
...
updates #1111
2019-06-04 11:12:22 +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
f2ac9ef4d7
converse-muc: Support for XEP-0410 to check whether we're joined
2019-06-03 11:41:34 +02:00
JC Brand
68d4a71c75
Fix _converse.api.user.login
to handle auto_login case
...
Also, set the resource in `setUserJID`
2019-06-03 11:40:26 +02:00
JC Brand
3c6a17f85c
Update to latest Strophe commit with explicit bind support
2019-06-03 10:02:57 +02:00
JC Brand
699fe0df63
Initial support for the CredentialsContainer web API
2019-06-03 09:43:24 +02:00
JC Brand
737e27c726
Use shakespearean character names in tests
2019-06-03 09:43:24 +02:00
JC Brand
5738b3748a
Use getDisplayName
for roster contacts
2019-06-03 09:43:24 +02:00
JC Brand
1fb5378524
Throw error on parser error in toStanza
2019-06-03 09:43:24 +02:00
JC Brand
f30d415f76
Refactor reconnection
2019-06-03 09:43:24 +02:00
JC Brand
55cffab594
Destroy session objects in clearSession
, not in tearDown
2019-06-03 09:43:24 +02:00
JC Brand
dc58e6d47f
Make teardown a function
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
a46ee4dfe1
Buttons aren't always there
2019-06-03 09:41:29 +02:00
JC Brand
7c7002ebf9
Add _converse.default_connection_options
...
So that we can specify defaults
2019-06-03 09:41:29 +02:00
JC Brand
eafe995f95
Rename variable for clarity
2019-06-03 09:41:29 +02:00
JC Brand
24956d8dca
Execute manual resource binding if necessary
2019-06-03 09:41:29 +02:00
JC Brand
0688907e0d
Allow events to be synchronous
...
When a synchronous event is fired, Converse will wait for all
promises returned by the event's handlers to finish before continuing.
2019-06-03 09:41:29 +02:00
JC Brand
6dea4eabe7
Ensure nickname form is rendered across page loads
...
if the page is reloaded while the nickname form is shown
2019-06-01 16:16:34 +02:00
JC Brand
267fb38e0c
Remove the forward_messages
config option
2019-05-31 16:07:51 +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
d86a657a66
converse-controlbox: No need anymore to override insertIntoDOM
...
We now use CSS to make sure that the controlbox and toggle is always on the far right.
2019-05-31 09:14:07 +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
2834e8d678
Bugfix. Single emoji messages don't display larger when restored from cache
2019-05-28 15:38:55 +02:00
JC Brand
7511d8c35e
Always clear messages and occupants cache before (re)entering a room
2019-05-28 14:30:55 +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
85c4d144ed
Only show mention autocomplete suggestions for MUC occupants with nicks
2019-05-27 22:45:54 +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
f20aee6906
Fixes #1576
...
When using `auto_login` and logging out, Converse gets stucks with an infinite spinner.
2019-05-26 15:30:15 +02:00
JC Brand
22e3c49660
Terminology fix
2019-05-26 11:20:31 +02:00
JC Brand
e1762a1bb5
Rename key event handler methods to avoid confusion
2019-05-26 11:09:43 +02:00
JC Brand
5054ecca08
Check whether controlbox exists before assigning
2019-05-24 20:50:30 +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