Commit Graph

2523 Commits

Author SHA1 Message Date
Julian Sparber
fb3edeb206 store: Save timeline to MemoryStore 2022-02-17 18:32:36 +01:00
Julian Sparber
516aa26589 store: Save timeline to SledStore
This writes slices from StateChanges::timeline to the SledStore.
The cache is removed when ever a limited sync response is received or
when an event already known to the store is received.

Stored events are redacted when a redaction event is received.
2022-02-17 16:15:17 +01:00
Julian Sparber
7d19e9aa34 test: Add mocked responses need for timeline storage 2022-02-17 16:15:17 +01:00
Julian Sparber
64c49cd137 Add stream to obtain the timeline of a room 2022-02-17 16:15:17 +01:00
Julian Sparber
c5950ac929 common: add TimelineSlice
The TimelineSlice is a slice of the timeline of a room and contains the
start and end of the slice.
2022-02-17 16:13:04 +01:00
Benjamin Kampmann
54303a03bf feat(sdk): Move Account related functions from Client into a new separated Account struct
Create Account struct
2022-02-16 19:51:16 +01:00
Benjamin Kampmann
78ea330d3a Merge remote-tracking branch 'origin/main' into pr/zecakeh/487 2022-02-16 18:30:24 +01:00
Benjamin Kampmann
93c46280ab feat(sdk): Add method to get homeserver capabilities
Merge pull request #495 from zecakeh/capabilities
2022-02-16 18:27:04 +01:00
Pass Automated Testing Suite
1e0a240701 feat(sdk): Support to autogenerate thumbnails for image attachments 2022-02-16 16:04:46 +01:00
Kévin Commaille
2f7d271c16 fix(sdk): Add license to attachment.rs 2022-02-15 19:15:06 +01:00
Kévin Commaille
9e545c34ba fix(sdk): Fix clippy warning 2022-02-15 19:00:39 +01:00
Kévin Commaille
69b0b04e70 fix(sdk): Add ruma feature for blurhash support 2022-02-15 18:43:56 +01:00
Kévin Commaille
de8aa7b4f7 fix(sdk): Simplify code in room::Joined::send_attachment 2022-02-15 18:15:59 +01:00
Kévin Commaille
ebd913f50f fix(sdk): Fix dead links in AttachmentConfig docs 2022-02-15 18:15:59 +01:00
Kévin Commaille
409afc6684 feat(sdk): Create AttachmentConfig struct 2022-02-15 18:15:59 +01:00
Kévin Commaille
c2c9d5ecc0 fix(sdk): Enable image_proc with image_rayon 2022-02-15 18:15:59 +01:00
Kévin Commaille
e926d7e928 chore: Update image dependency 2022-02-15 18:15:59 +01:00
Kévin Commaille
78489391d2 feat(sdk): Add method to send attachments with generated thumbnails 2022-02-15 18:15:59 +01:00
Kévin Commaille
5dc7dfd4c8 feat(sdk): Add method to generate thumbnails from images 2022-02-15 18:15:58 +01:00
Kévin Commaille
0436780292 feat(sdk): Allow to add info and thumbnail to attachments 2022-02-15 18:15:58 +01:00
Kévin Commaille
6389749931 fix(sdk): Return whole responses in Account 2022-02-15 18:15:05 +01:00
Kévin Commaille
abed1e2986 fix(sdk): Fix Account docs
Add a license and fix the dead links.
2022-02-15 18:15:05 +01:00
Kévin Commaille
9449b3ef23 feat(sdk): Add more methods to Account
- get_profile
- change_password
- deactivate
- get_3pids
- request_3pid_email_token
- request_3pid_msisdn_token
- add_3pid
- delete_3pid
2022-02-15 18:15:05 +01:00
Kévin Commaille
30d3cafa0c feat(sdk): Make upload_avatar return an MXC URI 2022-02-15 18:15:05 +01:00
Kévin Commaille
467005b603 feat(sdk): Move account-related methods to Account struct
Methods moved from Client to Account:
- display_name renamed to get_display_name
- set_display_name
- avatar_url renamed to get_avatar_url
- set_avatar_url
- avatar renamed to get_avatar
- upload_avatar
2022-02-15 18:15:05 +01:00
Kévin Commaille
c67d5afaf4 feat(sdk): Add method to get homeserver capabilities 2022-02-15 17:42:12 +01:00
Damir Jelić
a4ccbf0386 Merge branch 'up-ruma' 2022-02-15 14:46:18 +01:00
Damir Jelić
f220f2e743 fix(crypto): Remove an unused lifetime 2022-02-15 12:32:53 +01:00
Benjamin Kampmann
95e06ec732 Merge pull request #492 from zecakeh/fix-docs
fix(doc): Build nightly docs with correct features
2022-02-14 12:03:21 +01:00
Kévin Commaille
0570cd9439 fix(doc): Build nightly docs with correct features 2022-02-13 10:22:05 +01:00
Jonas Platte
c3d9c73d00 Make identifier parsing easier to read
… by using `Id::parse` instead of `Box::<Id>::try_from`.
2022-02-12 04:20:37 +01:00
Jonas Platte
a7dcd26588 Remove unused variable from test 2022-02-12 04:15:50 +01:00
Jonas Platte
735d9e5894 Use user_id! macro in more tests 2022-02-12 04:15:48 +01:00
Jonas Platte
8e41bccf8b Upgrade Ruma 2022-02-11 20:45:22 +01:00
Daniel García Moreno
4b5aae1123 Do not fail when no session if force_auth
It looks like the force_auth is working correctly when restoring the
session, but it's not working with the call to client.login, so it
cannot be used.

The access_token is not available in the login query, so if the option
force_auth is set, this call will fail always. This patch just ignores
the force_auth if there's no session, so any query will work when
force_auth is true.

Fix https://github.com/matrix-org/matrix-rust-sdk/issues/488
2022-02-11 15:22:39 +01:00
Benjamin Kampmann
8538bdcce2 fix[state store]: Persist stripped rooms in the right bucket
fixes #467 as well as persistence problems with the indexeddb store
2022-02-07 11:53:31 +01:00
Benjamin Kampmann
7aa99448c3 fix style 2022-02-04 18:02:00 +01:00
Benjamin Kampmann
29c851f463 fixing indexeddb store 2022-02-04 18:01:37 +01:00
Benjamin Kampmann
d20abe05ed lookup sync-token in proper bucket 2022-02-04 17:47:01 +01:00
Benjamin Kampmann
560ef86747 fixing style 2022-02-04 14:20:51 +01:00
Benjamin Kampmann
e68c75451e fixing failing test and naming convention 2022-02-04 14:18:26 +01:00
Benjamin Kampmann
355bb0a091 fixing style 2022-02-04 12:21:31 +01:00
Benjamin Kampmann
2a8c6dabaf Re-add population test 2022-02-04 12:20:10 +01:00
Benjamin Kampmann
772a585b80 stick to naming convention, clarify name 2022-02-04 12:10:53 +01:00
Benjamin Kampmann
51bf07fc34 fixing #467 2022-02-04 12:10:22 +01:00
Erik Johnston
59d21d9683 Replace uses of Vec::drain(..) with into_iter
`drain` is designed to be used when you want to reuse the `Vec` or only
move out a subset range. Using `.into_iter()` is more efficient and
idiomatic, and can be dropped entirely when used in `for` loops.
2022-02-03 14:43:14 +00:00
Benjamin Kampmann
1286357bcf Merge pull request #414 from gnunicorn/ben-wasm-store
IndexedDB support for wasm/browser environments
2022-02-03 09:14:54 +01:00
Benjamin Kampmann
fa60881e2d disable broken test 2022-02-02 20:34:52 +01:00
Benjamin Kampmann
990b897e94 switch tokio:test to async_test 2022-02-02 15:10:24 +01:00
Benjamin Kampmann
64709f1d6b fixing style 2022-02-02 14:54:29 +01:00