Commit Graph

57 Commits

Author SHA1 Message Date
JC Brand
9f8d30dde3 Create a new store, _converse.config to store trusted
The `_converse.session` store gets cleared after logout, but we want the
`trusted` flag to persist after logout.

Also update the documentation no that the `storage` config option has
been removed in favor of `trusted`.
2018-08-23 09:41:39 +02:00
JC Brand
9ed2ad631a Store whether this is a trusted device in _converse.session
So that it persists across page loads. Otherwise storage falls back to
the default, causing records to be in both local- and sessionStorage.

Additionally, update singleton models to have the 'id' available as a getter.

Otherwise multiple records gets stored in browserStorage, causing random
results being returned.
2018-08-22 23:36:54 +02:00
JC Brand
a2dec2371d Bugfix. jid of null was set on own VCard
Also made a few other minor improvements and did some cleanup.
2018-06-12 12:14:49 +02:00
JC Brand
5d62023701 Only fetch VCards once we're already connected 2018-06-07 14:28:20 +02:00
JC Brand
f7c3351e2b Merge branch 'master' into webpack 2018-06-04 13:46:27 +02:00
JC Brand
ec609a3883 Refetch VCards which we couldn't retrieve before 2018-05-25 16:25:02 +02:00
JC Brand
ab4d0204f3 Update all vcards that might be associated with an occupant 2018-05-25 15:55:34 +02:00
JC Brand
6dc9e8edf1 Use webpack for module bundling 2018-05-25 14:23:32 +02:00
JC Brand
36fd859a88 Store presence info in a separate collection
So that we can cache roster data for longer and presence data for
shorter.
2018-05-22 21:09:43 +02:00
JC Brand
d339a06ea7 Bugfix. Wrong dict key used. 2018-05-17 11:25:05 +02:00
JC Brand
63ce501798 We now only need to override set for the actual VCards
so rename model and only use it in the VCards collection.
2018-05-15 09:47:52 +02:00
JC Brand
38499917a9 updates #194
Include entity capabilities hash in outgoing presences

Also, started some work on using jsdoc for rendering API documentation.
Ideally that would go into a separate commit but that would take ages to
untangle.
2018-05-11 13:35:27 +02:00
JC Brand
8bd968a03b Also use the VCard cache for the user's own status 2018-05-08 19:24:50 +02:00
JC Brand
708b1dbe99 fixes #337
It's now possible to set your VCard via the UI and via the API
2018-05-08 18:14:56 +02:00
JC Brand
6c513ad4be Remove dependency on strophe's vcard plugin 2018-05-08 18:11:56 +02:00
JC Brand
b3619077f9 Remove dependency on the strophe disco plugin
And instead implement it ourselves.

This solves a bug with that plugin whereby the connection handlers are
added to early and are therefore never fired.

Also fixed a problem whereby entity items are queried for features
before the features have been fetched.
2018-05-07 18:06:50 +02:00
JC Brand
b8679063c5 Use the VCards collection for roster contacts
Instead of saving the vcard data on the contact model itself
2018-05-05 20:51:14 +02:00
JC Brand
e5cfdca30d Move roster models into their own module 2018-05-05 20:16:23 +02:00
JC Brand
09c55ebc28 Remove the use_vcards settings
VCards will now always be used.
2018-05-04 22:50:41 +02:00
JC Brand
71ed5bbdd1 Don't set vcard on the chatbox model 2018-05-03 18:44:02 +02:00
JC Brand
16b2a1b2a9 Avatar/VCard refactoring
- Refer to VCards instead of Avatars where appropriate
- Fetch VCards for non-groupchat messages as well
2018-05-03 18:34:28 +02:00
JC Brand
8c3f379d82 Calculate and save avatar hash upon receipt 2018-05-03 13:44:52 +02:00
JC Brand
53f5627b72 Add support for rendering avatars in groupchats 2018-05-01 18:18:02 +02:00
JC Brand
b5a516e044 Add new api method vcard.update 2018-05-01 14:59:02 +02:00
JC Brand
54cafb1243 Update vcard.get API method to accept either a JID string or a model 2018-05-01 11:45:12 +02:00
JC Brand
a9d2881888 Fix disco hierarchy
Previously we kept all entities and their items (which are also
instances of _converse.DiscoEntity) in a flat array.

Instead, we should have a tree-like structure where items are stored
on the relevant entity (and recursively on other items).
2018-04-14 07:36:24 +02:00
JC Brand
c8f72b350b Disable vcard plugin is use_vcard is false 2018-03-30 14:22:52 +02:00
JC Brand
c621732f2f Bugfix. Get JID from presence 2018-03-14 11:54:22 +00:00
JC Brand
0d8d99b850 Bugfix. vcard doesn't necessarily have jid 2018-03-07 10:31:33 +01:00
JC Brand
0bd96bbcfb Bugfix. Don't set xmppstatus' jid to null 2018-02-23 22:19:24 +01:00
JC Brand
c4367e7a0a Show own avatar 2018-02-19 22:12:50 +01:00
JC Brand
62ad605bec Bugfix. Attribute error when empty IQ stanza is returned for vCard query 2018-01-30 10:25:08 +01:00
JC Brand
1adc4938a8 Fetch VCard when starting a chat with someone not in the user's roster 2017-12-03 20:50:13 +01:00
JC Brand
393bbe020e Check disco before fetching own vcard. 2017-12-03 11:10:59 +01:00
JC Brand
8662f751e3 Refactor converse-vcard and add API method to fetch a VCard 2017-12-02 18:01:56 +01:00
JC Brand
3514d6d56b fixes #316
- Also allow private chats to be opened via URL fragment.
- Make sure to clear the URL fragment when the relevant chat is closed.
2017-10-31 23:11:27 +01:00
JC Brand
b9b9689668 Fixes #912 maximize method in converse-minimize fails...
if the `controlbox` is not there.

Also, make `converse-controlbox` and `converse-muc` optional dependencies of
`converse-minimize`.
2017-08-29 12:21:53 +02:00
JC Brand
3b8c2d1b00 Various bug and timing fixes due to the previous refactoring 2017-08-16 14:16:24 +02:00
JC Brand
01888b9ba4 vcard: Properly handle case where FN is empty in VCard 2017-08-09 14:37:33 +02:00
JC Brand
7850c38faa disco: Create new plugin converse-disco.
We can now support feature discovery for multiple entities (although we
currently still only query for the user's own XMPP server).
2017-07-21 15:09:50 +02:00
JC Brand
b85b29bb20 vcard: Bugfix. 'FN' may not be defined. 2017-07-15 17:26:59 +02:00
JC Brand
27760a7d51 vcard: remove jQuery as dependency 2017-07-13 23:27:24 +02:00
JC Brand
6ef0536e31 Some work on using es6 promises 2017-07-10 21:14:48 +02:00
JC Brand
9a9eae3fcf Use esnext to auto-generate es2015 syntax 2017-07-10 17:46:22 +02:00
JC Brand
40e7ee1ae6 Initial stab at using ES2015
Mostly replaced ``var`` with ``let`` and ``const``.
Also added a few arrow functions.
2017-07-10 12:49:20 +02:00
JC Brand
5ab1693136 logging: Add deprecation warning for updateSettings
and also use the Strophe.LogLevel levels for logging in general.
2017-07-05 11:33:55 +02:00
JC Brand
f81a94baf1 Move updateSettings to the private API.
Also add an API method for exposing new promises.

Update the plugin and API documentation, specifically concerning the above
changes.
2017-07-05 11:03:13 +02:00
JC Brand
fe6a9ca748 Merge converse-api and converse-core
Otherwise `require('converse-core')` can be called, exposing the inner converse
object.
2017-02-14 14:35:52 +00:00
JC Brand
f73a1d3fc0 Don't name the modules.
According to the require.js docs this shouldn't be done.
http://requirejs.org/docs/whyamd.html#namedmodules
2017-02-13 14:37:17 +00:00
JC Brand
9b48b2d6bd Update plugins to not depend on converse-core
To illustrate that this is not necessary (and also not possible with
non-bundled plugins).
2017-02-02 18:34:13 +00:00