Commit Graph

166 Commits

Author SHA1 Message Date
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
463caf36a1 bookmarks: silently remove bookmarks when clearing the session 2019-09-26 16:43:26 +02:00
JC Brand
44e5b4c947 bosh: only advertise support if the module is enabled
updates #1725
2019-09-24 15:42:13 +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
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
768ed4a577 Replace lodash methods with built-ins, convert docstrings to JSDoc 2019-09-07 23:14:33 +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
c8f0fd2a7f Refactor cleaner separation between converse-vcard and other plugins 2019-09-05 10:49:06 +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
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
4cb9fd88a8 Refactor emojis so that JSON is fetch asynchronously 2019-08-22 13:56:47 +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
21a9ea7365 converse-message-view: Add hooks before/after message text transformations 2019-08-13 15:31:05 +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
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
271a871a51 Updated i18n po, pot and json files 2019-08-07 10:28:49 +02:00
JC Brand
7a590f7c22 Stop using certain lodash methods.
* _.isNil
* _.noop
* _.isNull
2019-08-05 10:56:22 +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
5b64b5a0e3 The locales URL should be absolute 2019-07-31 16:13:33 +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
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
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
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
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
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
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
06717370f1 Provide a traceback when waitUntil times out 2019-07-11 23:42:26 +02:00