Kegan Dougal
2c6d4c5a5c
Implement deserialize() on all parts of the object graph
2017-02-02 12:38:03 +00:00
Richard van der Hoff
f81d6b6157
Factor out device list management
...
crypto/index.js was getting huge, so move the device list update management out
to a separate file.
This shouldn't have any effect on functionality.
2017-02-02 10:18:30 +00:00
Kegan Dougal
ef17214ae2
Add remaining load functions
2017-02-02 10:18:09 +00:00
Matthew Hodgson
5d544c773d
Merge branch 'develop' into matthew/warn-unknown-devices
2017-02-01 22:35:25 +00:00
Kegan Dougal
721b9df35d
Add deserialize() static functions for User and MatrixEvent
...
The intent here is to make it possible to repopulate User objects from an
IndexedDB object store, which stores things according to the structured-clone
algorithm. We can't just `Object.assign` everything because it would assign
JSON objects to fields which should be classes (eg `MatrixEvent`).
2017-02-01 10:35:55 +00:00
Kegan Dougal
0317830b12
Check for a deserialize() function
2017-02-01 09:49:55 +00:00
Kegan Dougal
dfd8c56838
Factor out upsert. Check for serialize() function on inserted objects
2017-02-01 09:42:20 +00:00
Kegan Dougal
025cb8bd91
Repopulate as User objects, not JSON objects
2017-01-31 17:33:12 +00:00
Kegan Dougal
fa89f2be77
Start loading content from IndexedDB. Add idealised usage example.
2017-01-31 16:53:26 +00:00
Kegan Dougal
bf008a1bee
Fix build and add stub store connect()
2017-01-31 16:33:43 +00:00
Kegan Dougal
8656ad584b
Introduce the concept of IndexedDBStoreBackend
...
So IndexedDBStore can meet the Store interface and we don't need to mess
with the guts of MatrixInMemoryStore.
2017-01-31 16:08:05 +00:00
Kegan Dougal
e316a9a5b3
Merge branch 'develop' into kegan/indexeddb
2017-01-31 15:04:43 +00:00
Richard van der Hoff
2395d2856b
Merge pull request #344 from matrix-org/rav/allow_e2e_options
...
Record all e2e room settings in localstorage
2017-01-30 16:26:23 +00:00
Richard van der Hoff
656c54ead9
Record all e2e room settings in localstorage
...
I can't quite remember what the logic behind only recording the algorithm in
localstorage was, but the upshot is that if you try to set any e2e config
options (such as the megolm rotation periods) via the room state, then the
state gets rejected and you can't send any events.
2017-01-30 11:40:09 +00:00
Richard van der Hoff
c6e21c9c5c
Make Olm work with browserified js-sdk
...
We want to avoid distributing olm as part of the js-sdk, so we exclude it from
the browserified build. Previously this meant that you couldn't use olm this
way.
We can do better though: if the web page includes olm.js via a separate script
tag, that will set global.Olm, which we can get browserify to shim in.
2017-01-28 15:35:55 +00:00
Kegan Dougal
522105a858
First cut
2017-01-26 16:57:59 +00:00
Kegan Dougal
776cfed2b3
Merge branch 'develop' into kegan/indexeddb
2017-01-26 14:29:30 +00:00
Richard van der Hoff
85cf2a3692
Fix lint
2017-01-26 13:29:56 +00:00
Richard van der Hoff
c9b700ef6a
Merge branch 'matthew/warn-unknown-devices' into matthew/blacklist-unverified
2017-01-26 13:25:10 +00:00
Richard van der Hoff
34fde7d16d
Store device 'known' status in session store
2017-01-26 13:15:50 +00:00
Matthew Hodgson
5911c4d2db
don't automatically mark devices as known; require the app to do it
2017-01-25 23:53:51 +01:00
Richard van der Hoff
085493d580
Fix tests
2017-01-25 14:59:14 +00:00
Richard van der Hoff
5245c7f2ab
Merge remote-tracking branch 'origin/develop' into matthew/warn-unknown-devices
2017-01-25 11:03:23 +00:00
Richard van der Hoff
4ccd649358
Address my own review comments
2017-01-25 11:02:49 +00:00
Matthew Hodgson
3d30ad843f
make it work
2017-01-22 01:29:33 +01:00
Matthew Hodgson
d37935dd78
actually consider _crypto.getGlobalBlacklistUnverifiedDevices
2017-01-21 17:51:48 +00:00
Matthew Hodgson
512d5882c9
track whether we blacklist unverified devices per-room & globally
2017-01-21 17:38:35 +00:00
Matthew Hodgson
e79926db6c
fix lint
2017-01-21 05:26:01 +00:00
Matthew Hodgson
34a0bd4c38
oops, unbreak it
2017-01-21 05:13:12 +00:00
Matthew Hodgson
fb820fa9a7
experimental support for warning users when unknown devices show up in a room.
...
hopefully a step towards fixing https://github.com/vector-im/riot-web/issues/2143
2017-01-21 05:10:51 +00:00
David Baker
423175f539
eslint --fix for dangley commas on function calls
2017-01-20 16:12:02 +00:00
David Baker
80129e7483
Fix last prefer-const, decrease max warnings
...
and make prefer-const an error
2017-01-19 18:24:28 +00:00
David Baker
dc74a2326f
Fix some more consts
2017-01-19 18:11:09 +00:00
David Baker
7bca05af64
eslint ---fix for prefer-const
2017-01-19 17:42:10 +00:00
Richard van der Hoff
78031f2c04
Merge pull request #326 from matrix-org/rav/megolm_export
...
Support for importing and exporting megolm sessions
2017-01-19 03:04:35 +00:00
David Baker
9a593f147f
Fix non-screensharing calls
2017-01-16 13:12:18 +00:00
Richard van der Hoff
c8b26eeac4
Support for importing megolm session keys
2017-01-14 00:45:03 +00:00
Richard van der Hoff
766d8f0ba4
Support for exporting megolm session data
2017-01-14 00:45:03 +00:00
Kegan Dougal
e159e504fa
Use ev.target.result for consistency
2017-01-13 17:57:41 +00:00
Kegan Dougal
8bcb048f53
Very rough WIP of an IndexedDBStore
2017-01-13 16:22:59 +00:00
Kegan Dougal
5abf6b9f20
Manually patch up files which were formatted wrong
...
`eslint --fix` expands `if` statements incorrectly (wrong indentation).
2017-01-13 11:50:00 +00:00
Kegan Dougal
7ed65407e6
Pass through eslint --fix
2017-01-13 10:49:32 +00:00
Kegan Dougal
1ce9e7c6bb
BREAKING CHANGE: Remove WebStorageStore
...
This will be replaced with an IndexedDB style solution. Maintaining 2 different
persistent stores is not my idea of fun.
2017-01-13 10:44:20 +00:00
David Baker
4ab261b89f
Add eslint:recommends
...
Turn off / tweak some options from it. Fix a double-definition.
Add an eslint config to the spec directory to tell it about the
jasmine magic globals.
2017-01-12 15:05:42 +00:00
David Baker
e057956ede
Add google eslint rules as a base
...
Remove some we don't care about. Set some other ones we do care
about but don't currently adhere to to warn. Set the max warnings
threshold to the current number of warnings, so we don't introduce
more of them. Fix a bunch of legit lint errors and add exceptions
to various places in the test code that does funny things with
'this'.
2017-01-12 14:35:58 +00:00
David Baker
0a11404be2
Fix legitimate JSDoc errors
2017-01-12 11:46:07 +00:00
Kegan Dougal
101970dcd9
Merge branch 'develop' into kegan/es6
2017-01-11 10:35:01 +00:00
Kegan Dougal
ae6a409cc2
Move /lib to /src
2017-01-11 10:09:04 +00:00