Commit Graph

13223 Commits

Author SHA1 Message Date
Benjamin Bouvier 5337c9d9ea refactoring: make it clear that notifications aren't stored in the state store
`notifications` were stored in the `StateChanges` struct, which made me think that they're then persisted in the database. It's not the case, they
were just stored there by convenience. This commit changes it to a parameter that's passed, as it's not too invasive and clearer that this is only
transient data.
2023-12-07 16:56:18 +01:00
Benjamin Bouvier 9fd52e5df7 timeline: document event_filter better 2023-12-07 10:35:42 +01:00
Benjamin Bouvier 4ab79a4085 timeline: add the room version in the event_filter parameters 2023-12-07 10:35:42 +01:00
Benjamin Bouvier a132c0a885 read receipts: apply a default event filter only for events that get rendered 2023-12-07 10:35:42 +01:00
Benjamin Bouvier 5081802177 room: try restoring from a key backup during backpagination too 2023-12-05 16:53:06 +01:00
Stefan Ceriu 736188811f ffi: expose the call member state event type for clients to check if users can join calls 2023-12-05 15:51:28 +01:00
Benoit Marty 1337fdf0b8 ffi: Expose is_invite_for_me_enabled and set_invite_for_me_enabled in notification settings 2023-12-04 17:04:19 +01:00
Ivan Enderlin 0573137835 Merge pull request #2902 from matrix-org/rav/outgoing_key_requests_switch
Crypto: add new methods for turning off room key requests
2023-12-04 15:12:33 +01:00
Ivan Enderlin 21ce2b07a7 Merge pull request #2904 from matrix-org/jme/add-typing-notice-bindings
Add FFI bindgings for `Room.typing_notice()`
2023-12-04 15:09:46 +01:00
Richard van der Hoff 6451a9dffe rename toggle -> set 2023-12-04 12:53:02 +00:00
Kévin Commaille a6af31984a Assert that the stream is pending
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-12-04 13:30:43 +01:00
Kévin Commaille 2de45bcb51 notification settings: Do not expose NotificationSettings::new in the public API
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-12-04 13:30:43 +01:00
Kévin Commaille 7bdc1448bd notification settings: Drop event handler only when last instance is dropped
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-12-04 13:30:43 +01:00
Kévin Commaille 511c44c588 Add test for NotificationSettings::subscribe_to_changes
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-12-04 13:30:43 +01:00
Kévin Commaille a915900580 notification settings: Allow to subscribe to changes
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-12-04 13:30:43 +01:00
Kévin Commaille e12f6fcbb7 notification settings: Accept any type that implements AsRef<str> as rule_id
Simplifies the use of this API with the Predefined{*}RuleId Ruma types.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-12-04 13:30:43 +01:00
Jorge Martín 72dfd3d1fd Add FFI bindgings for Room.typing_notice() 2023-12-01 16:19:32 +01:00
Richard van der Hoff a6c206118d changelog 2023-12-01 12:50:43 +00:00
Richard van der Hoff 2536373546 Add new methods for turning off room key requests 2023-12-01 12:47:44 +00:00
Jorge Martín 045d94ab4b Rename message inside an error, since it clashes with Kotlin's default message property in exceptions 2023-12-01 12:07:40 +01:00
Benjamin Bouvier d8c02d7e55 timeline builder: tweak comments 2023-12-01 11:05:53 +01:00
Benjamin Bouvier b20313c492 read receipts: rename ReadReceipts fields
The "read_receipts" suffix isn't useful since we're looking at the fields of `ReadReceipts` already.
2023-12-01 11:05:53 +01:00
Benjamin Bouvier c3ea2c3736 Format with rustfmt nightly. 2023-12-01 11:05:53 +01:00
Benjamin Bouvier 2c1377b2b5 read receipts: a few function renamings and add getter/setter for receipts on events 2023-12-01 11:05:53 +01:00
Benjamin Bouvier bb85af9279 read receipts: add getter/setter for the latest read receipts cache 2023-12-01 11:05:53 +01:00
Benjamin Bouvier 58ab6704ff read receipts: a few function renamings
Add the prefix `load` to make it clear this may load from the storage.
2023-12-01 11:05:53 +01:00
Benjamin Bouvier 94a64296d1 Show the wrapped error when displaying a SlidingSync::JoinError 2023-11-30 19:52:20 +01:00
Benjamin Bouvier 7d6c16956f fix: reify reformat of missing_session_devices_by_user
`itertools::format` is known to cause issues when its display implementation is being
used multiple times, as it consumes the iterator it was given (and that can only happen once,
unless caching it). This is bad, as our production apps may have multiple subscribers they will
run into a panic.

The fix is to reify the debug string before it's logged, so the tracing consumer will only see
a string, and not the display implementation that would panic on the second use.
2023-11-30 19:52:20 +01:00
Damir Jelić 916bf69e5c Enable backups and set the backup download strategy for the bindings 2023-11-30 16:51:06 +01:00
Damir Jelić 915c10e1b4 Test for the one-by-one download of room keys 2023-11-30 16:20:51 +01:00
Damir Jelić 5e122c5c5e Add a background task which downloads room keys from the backup one-by-one 2023-11-30 16:20:51 +01:00
Damir Jelić 49e5461ef7 Add a method to check if we have a room key stored locally 2023-11-30 16:20:51 +01:00
Damir Jelić 27927c676d Allow the to create a FailuresCache with different values for the max timeout 2023-11-30 16:20:51 +01:00
Damir Jelić ac5a9e106b Move the FailuresCache into the common crate 2023-11-30 16:20:51 +01:00
Damir Jelić 94c4e685fc Test for recovery 2023-11-30 15:12:22 +01:00
Damir Jelić f248e272e9 Expose the recovery stuff in the bindings 2023-11-30 15:12:22 +01:00
Damir Jelić 97026fc3a6 Recovery support
Co-authored-by: Jonas Platte <jplatte@matrix.org>
2023-11-30 15:12:22 +01:00
Richard van der Hoff 1fcd5af526 indexeddb: Update storage for inbound_group_sessions (#2885)
Currently, querying for inbound group sessions which need backing up is very
inefficient: we have to search through the whole list.

Here, we change the way they are stored so that we can maintain an index of the
ones that need a backup.

Fixes: https://github.com/vector-im/element-web/issues/26488
Fixes: https://github.com/matrix-org/matrix-rust-sdk/issues/2877

---

* indexeddb: Update storage for inbound_group_sessions

Currently, querying for inbound group sessions which need backing up is very
inefficient: we have to search through the whole list.

Here, we change the way they are stored so that we can maintain an index of the
ones that need a backup.

* Rename functions for clarity

* Remove spurious log line

This was a bit verbose

* Rename constants for i_g_s store names

* improve log messages

* add a warning

* Rename `InboundGroupSessionIndexedDbObject.data`

* formatting
2023-11-30 12:01:20 +01:00
Benjamin Bouvier 8b04db666c Remove room.rs file added by mistake
Thanks @jaller94 for noticing and letting me know :)
2023-11-30 10:27:25 +01:00
Timo 1ff2c5bb3e Add recommended vscode settings in contrib/ide 2023-11-28 13:41:04 +01:00
Jonas Platte 05f0106e06 ui: Improve logging for sync update processing 2023-11-27 18:55:21 +01:00
Jonas Platte fd0f369f75 ui: Add extra tracing spans for reactions 2023-11-27 18:55:21 +01:00
Jonas Platte 39fc283353 ui: Improve logging for redactions 2023-11-27 18:55:21 +01:00
Jonas Platte 3ebd8afa49 ui: Add more logging for Timeline::retry_send 2023-11-27 18:55:21 +01:00
Jonas Platte 2483ba2cc6 ui: Raise log level for local events
Local events don't happen as often, so we can afford a higher log level.
2023-11-27 18:55:21 +01:00
Jonas Platte 2d3a458a08 ui: Improve logging for sending attachments 2023-11-27 18:55:21 +01:00
Jonas Platte 246a128ec3 ui: Add logging for send-event cancellation 2023-11-27 18:55:21 +01:00
Jonas Platte 932f12e76d ui: Improve logging for timeline resets 2023-11-27 18:55:21 +01:00
Richard van der Hoff bfe79468c6 Indexeddb: Groundwork for fixing inbound_group_session lookups (#2884)
A set of non-functional changes which lay some groundwork in preparation for fixing vector-im/element-web#26488.
2023-11-27 15:59:49 +00:00
Timo 9503eb49c7 ffi: Expose power level overwrites on room creation 2023-11-27 14:38:35 +00:00