Commit Graph

7506 Commits

Author SHA1 Message Date
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
Weblate (bot)
1ba320ef46 Update from Weblate (#1655)
* Translated using Weblate (Norwegian Bokmål)

Currently translated at 70.9% (268 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/nb_NO/

* Translated using Weblate (Hebrew)

Currently translated at 100.0% (378 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/he/

* Translated using Weblate (German)

Currently translated at 100.0% (378 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/de/

* Translated using Weblate (French)

Currently translated at 100.0% (378 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/fr/

* Translated using Weblate (Spanish)

Currently translated at 100.0% (378 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/es/

* Translated using Weblate (Japanese)

Currently translated at 98.1% (371 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/ja/

* Translated using Weblate (Galician)

Currently translated at 100.0% (378 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/gl/

* Translated using Weblate (Lithuanian)

Currently translated at 80.4% (304 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/lt/

* Added translation using Weblate (Portuguese)

* Translated using Weblate (Arabic)

Currently translated at 81.7% (309 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/ar/

* Translated using Weblate (Czech)

Currently translated at 100.0% (378 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/cs/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 38.4% (145 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/zh_Hans/

* Translated using Weblate (Turkish)

Currently translated at 4.8% (18 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/tr/

* Translated using Weblate (Portuguese)

Currently translated at 83.1% (314 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/pt/

* Translated using Weblate (Portuguese)

Currently translated at 82.5% (312 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/pt/

* Translated using Weblate (Romanian)

Currently translated at 34.4% (130 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/ro/

* Translated using Weblate (Romanian)

Currently translated at 38.4% (145 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/ro/

* Translated using Weblate (Romanian)

Currently translated at 54.0% (204 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/ro/

* Translated using Weblate (Arabic)

Currently translated at 86.5% (327 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/ar/

* Translated using Weblate (Romanian)

Currently translated at 54.8% (207 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/ro/

* Translated using Weblate (Portuguese (Brazil))

Currently translated at 63.2% (239 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/pt_BR/

* Translated using Weblate (Portuguese)

Currently translated at 82.8% (313 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/pt/

* Translated using Weblate (Basque)

Currently translated at 94.2% (356 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/eu/

* Translated using Weblate (Galician)

Currently translated at 100.0% (378 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/gl/

* Translated using Weblate (Turkish)

Currently translated at 16.9% (64 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/tr/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 40.5% (153 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/zh_Hans/

* Translated using Weblate (Polish)

Currently translated at 80.7% (305 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/pl/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 40.2% (152 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/zh_Hans/

* Translated using Weblate (Portuguese (Brazil))

Currently translated at 77.5% (293 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/pt_BR/

* Translated using Weblate (Portuguese)

Currently translated at 88.9% (336 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/pt/

* Translated using Weblate (Russian)

Currently translated at 96.8% (366 of 378 strings)

Translation: Converse.js/Translations
Translate-URL: https://hosted.weblate.org/projects/conversejs/translations/ru/
2019-07-26 15:03:11 +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
9a7dd99889 Ensure python 3.7 is used for sphinx and bump lerna version 2019-07-25 13:24:16 +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
30ad84d386 Update Lerna 2019-07-23 08:14:13 +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
033b6bd082 Break long words instead of showing a horizontal scrollbar 2019-07-22 16:36: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
fa3c6604ac
Creating FUNDING.yml 2019-07-05 09:32:28 +02:00
JC Brand
4c0eeaeeb7
Create issue templates (#1628)
* Create bug report template
* Create feature request template
2019-07-05 09:27:56 +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
1a3526f537 Update openAndEnterChatRoom to take JID 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