Alfonso Grillo
08b3c0e47e
Feature: add API for setting underride push rule's actions ( #2644 )
2023-10-03 10:08:17 +02:00
Benjamin Bouvier
7e8827aec2
fix: make the crypto memory store write the next_batch_token only if provided
...
This matches the behaviors of the two other implementations.
2023-10-02 19:05:07 +02:00
Benjamin Bouvier
3fa79ce891
chore: make the crypto stores more robust by serializing save_changes()
...
Stores may race when performing writes, since in `save_changes` some data is pickled, and live across await points (it could be stale after an
await point). To prevent multiple threads racing when calling into `save_changes`, a new lock is introduced there.
2023-10-02 19:05:07 +02:00
Benjamin Bouvier
76c3f2a139
chore: remove a few spurious async on MemoryStore
2023-10-02 19:05:07 +02:00
Benjamin Bouvier
8d6f414375
chore: move CryptoStore::save_account to Store::save_account
...
as it can be implemented in terms of other methods already present in the `CryptoStore` trait.
2023-10-02 19:05:07 +02:00
Matthew Hodgson
9ddef138c1
feat: support creating emotes ( #2648 )
...
* support creating emotes
adds an emote param to message_event_content_from_markdown and
message_event_content_from_html so that clients can create
m.room.message events with msgtype emote (on the assumption
that the msgtype returned in the RoomMessageEventContentWithoutRelation
is immutable, and so can't be overridden by the client)
* lint
* switch to separate methods per review feedback
2023-10-02 18:48:33 +02:00
Benjamin Bouvier
7203ae9576
fix: use insecure OIDC whenever configuring with an http homeserver URL ( #2652 )
...
Fixes https://github.com/matrix-org/matrix-rust-sdk/issues/2645 .
The previous PR only enabled support for `server_name` homeserver configurations, this makes it work for `homeserver_url` too.
2023-10-02 10:27:30 +00:00
Ivan Enderlin
2f97301d5c
chore(ui): Add homepage and license to Cargo.toml
...
chore(ui): Add `homepage` and `license` to `Cargo.toml`
matrix-sdk-crypto-ffi-0.3.13
2023-10-02 10:07:41 +02:00
Ivan Enderlin
f7c008af3c
chore(ui): Add repository and license to Cargo.toml.
2023-10-02 09:41:29 +02:00
kegsay
58e15f812d
oidc: allow http scheme during discovery ( #2642 )
...
This is to enable entirely local stacks of Element X to work correctly. It's mostly seamless (no ffi changes) because it ties into `ClientBuilder.insecure_server_name_no_tls()`.
---------
Co-authored-by: Benjamin Bouvier <public@benj.me >
2023-09-29 11:29:30 +00:00
Benjamin Bouvier
9cc9221808
notifications: match decryption errors more precisely when waiting for decryption in the background
2023-09-29 12:37:16 +02:00
Benjamin Bouvier
e679182fb5
fix(notifications): don't hard-fail if decrypting failed
...
Before this commit, a call to get_notification would fail if decrypting failed on the first attempt, because `Room::decrypt_event` will hard-fail if the key wasn't found.
2023-09-29 12:37:16 +02:00
Benjamin Bouvier
787a85615c
chore(notifications): tweak logs in notification client
2023-09-29 12:37:16 +02:00
Benjamin Bouvier
6a5a4db5fc
fix(notifications): add a mutex to serialize e2ee encryption requests
2023-09-29 12:37:16 +02:00
Benjamin Bouvier
1cedd1097a
chore(notifications): rename sliding_sync_mutex to notification_sync_mutex
2023-09-29 12:37:16 +02:00
Benjamin Bouvier
2677d16f2e
chore: look ma i'm a 10x engineer ok
2023-09-29 12:25:52 +02:00
Benjamin Bouvier
1e5e13bb19
chore: make use of StaticAccountData in one extra location
2023-09-29 12:25:52 +02:00
Benjamin Bouvier
1eeee288b9
chore: move unsigned_device_keys to StaticAccountData too
2023-09-29 12:25:52 +02:00
Benjamin Bouvier
e4fd8e7ac6
chore: move methods from ReadOnlyAccount to StaticAccountData
2023-09-29 12:25:52 +02:00
Valere
ab2f18df3b
Add new API to request missing secrets ( #2641 )
2023-09-29 12:12:34 +02:00
Benjamin Bouvier
a1f6e2fb16
chore: clippy + remove spurious Arc
2023-09-28 17:21:53 +02:00
Benjamin Bouvier
8f541c9a09
chore: remove ReadOnlyAccount from the Account
...
And use the `self.store.account()` when we really need the `ReadOnlyAccount`. Also cache the immutable account data in this Account.
2023-09-28 17:21:53 +02:00
Benjamin Bouvier
c01d2d990c
chore: use StaticAccountData in more places
...
Sorry, this commit is a bit big. What happened is that I've pulled a thread: put a `StaticAccountData` there, look at caller; it seems to use only a
static account too, so keep up.
The only contender was the `OwnUserIdentity` data structure which really wants to sign things. Lucky for us, we could pass it a `ReadOnlyAccount`
from a store, in those cases, since we always had a `Store` hanging around; in the future it'll read it from the store cache, which is somewhat
identical.
2023-09-28 17:21:53 +02:00
Benjamin Bouvier
13be4b0dce
chore: use a StaticAccountData in the Sas data structures
2023-09-28 17:21:53 +02:00
Benjamin Bouvier
650d99a875
chore: rename account_info/get_account_info to static_account/get_static_account
2023-09-28 17:21:53 +02:00
Benjamin Bouvier
1c311555ef
chore: put the immutable parts of ReadOnlyAccount into its own data struct
2023-09-28 17:21:53 +02:00
Kévin Commaille
f115bd0e25
base: Fix typo
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2023-09-28 16:54:03 +02:00
Kévin Commaille
4595e2c064
indexeddb: Close DB less often during migrations
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2023-09-28 16:54:03 +02:00
Kévin Commaille
f3b8bdbe1e
indexeddb: Migrate RoomInfo to new format
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2023-09-28 16:54:03 +02:00
Kévin Commaille
23b34bfc2b
indexeddb: Make sure each migration is discrete
...
We might need to rely on the data in the DB to already be corrected
before using it for another migration
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2023-09-28 16:54:03 +02:00
Kévin Commaille
d4f0f7a704
sqlite: Migrate RoomInfo to new format
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2023-09-28 16:54:03 +02:00
Kévin Commaille
0856cf10fe
base: Add migration helpers for converting serialized format of RoomInfo
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2023-09-28 16:54:03 +02:00
Kévin Commaille
cd4bc7a62c
base: Return m.room.create event's content even if it is redacted
...
Starting with room version 11, all fields are kept when the event is redacted
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2023-09-28 16:54:03 +02:00
Kévin Commaille
acfb999e76
base: Make BaseRoomInfo compatible with room version 11
...
By copying the sender field as the creator field of m.room.create's event content
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2023-09-28 16:54:03 +02:00
Benjamin Bouvier
79f408b511
feat: automatically reload the tracked users when getting the cache
2023-09-28 16:37:52 +02:00
Benjamin Bouvier
c18ac12ce9
Apply suggestions from code review
...
Co-authored-by: Damir Jelić <poljar@termina.org.uk >
2023-09-28 16:37:52 +02:00
Benjamin Bouvier
216b3b9d77
feat: add a dummy StoreCacheGuard too, and make use of it
2023-09-28 16:37:52 +02:00
Benjamin Bouvier
00d6b2d2ae
chore: rename Store::load_tracked_users to Store::ensure_sync_tracked_users
2023-09-28 16:37:52 +02:00
Benjamin Bouvier
2499d13839
chore: remove outdated code comment
2023-09-28 16:37:52 +02:00
Benjamin Bouvier
074bcca02e
feat: introduce dummy crypto cache for the store
2023-09-28 16:37:52 +02:00
Benjamin Bouvier
851b3f2982
chore(crypto): simplify Store::load_tracked_users
2023-09-28 16:37:52 +02:00
Daniel Abramov
585508f461
sdk(widget): Add the matrix (i/o) part
2023-09-28 16:01:26 +02:00
Hubert Chathi
4478826a2f
Fix a typo
2023-09-28 15:31:25 +02:00
Marco Romano
0158422dcd
Bump ruma
...
- Bumps ruma to include https://github.com/ruma/ruma/pull/1665
- Enables ruma `compat-arbitrary-length-ids` flag instead of using the now deprecated `lax-id-validation`
2023-09-28 14:01:18 +02:00
Damir Jelić
1f695bf26e
Move most of our locks in the Client into the ClientLocks struct
2023-09-28 13:06:09 +02:00
Damir Jelić
e37cfe6036
Don't use a static for the mark_room_as_dm lock
...
Using a static lock would prevent two Client instances to call the
method at the same time.
We're going to assume that people won't have multiple Client instances
for the same user, in which case a static lock would have been helpful.
Co-authored-by: Jonas Platte <jplatte@matrix.org >
2023-09-28 13:06:09 +02:00
Richard van der Hoff
bcbb7c61f8
Enable the tests for encrypted indexeddb stores
...
Empirically, these seem to work for me, so let's re-enable them
2023-09-28 12:53:40 +02:00
Valere
4c432a66b4
Distinguish between changed and unchanged user identities ( #2618 )
2023-09-28 10:14:09 +02:00
Damir Jelić
24a203a126
Ensure that we can't try to mark two rooms as a DM at the same time
2023-09-27 16:24:57 +02:00
Jonas Platte
cbb7b24cb5
Rewrite public widget API
2023-09-27 14:45:33 +02:00