Commit graph

29 commits

Author SHA1 Message Date
Jade Ellis
a8ac9fef10 feat: Add bundled aggregations support
Add support for the m.replace and m.reference bundled
aggregations.
This should fix plenty of subtle client issues.
Threads are not included in the new code as they have
historically been written to the database. Replacing the
old system would result in issues when switching away from
continuwuity, so saved for later.
Some TODOs have been left re event visibility and ignored users.
These should be OK for now, though.
2025-06-21 09:22:21 -07:00
Jade Ellis
7579d0acf8 refactor: Promote handling unsigned data out of timeline
Also fixes:
- Transaction IDs leaking in event route
- Age not being set for event relations or threads
- Both of the above for search results

Notes down concern with relations table
2025-06-21 09:22:21 -07:00
Jason Volk
532dfd004d move core::pdu and core::state_res into core::matrix::
Signed-off-by: Jason Volk <jason@zemos.net>
2025-04-05 02:44:46 +00:00
Jason Volk
bee4c6255a reorg PduEvent strip tools and callsites
Signed-off-by: Jason Volk <jason@zemos.net>
2025-03-30 23:00:37 +00:00
Jason Volk
9d0ce3965e fix lints
Signed-off-by: Jason Volk <jason@zemos.net>
2025-03-26 02:25:54 +00:00
June Clementine Strawberry
0e342aab7f
fix a few error codes
Signed-off-by: June Clementine Strawberry <june@3.dog>
2025-03-09 14:20:24 -04:00
June Clementine Strawberry
a1e1f40ded
run cargo fix for rust 2024 changes and rustfmt
Signed-off-by: June Clementine Strawberry <strawberry@puppygock.gay>
2025-02-23 01:17:45 -05:00
Jason Volk
af399fd517 flatten state accessor iterations
Signed-off-by: Jason Volk <jason@zemos.net>
2025-01-29 01:18:08 +00:00
Jason Volk
68856645ee refactor lazy-loading
Signed-off-by: Jason Volk <jason@zemos.net>
2025-01-26 17:48:53 +00:00
Jason Volk
925061b92d flatten timeline pdus iterations; increase concurrency
Signed-off-by: Jason Volk <jason@zemos.net>
2025-01-09 18:14:23 +00:00
strawberry
77e0b76408
apply new rustfmt.toml changes, fix some clippy lints
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-12-15 01:00:41 -05:00
strawberry
0317cc8cc5
rename conduit to conduwuit finally
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-12-14 22:24:45 -05:00
strawberry
fe1ce521aa
add ignored user checks on /context and /event, misc cleanup
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-12-04 18:33:12 -05:00
Jason Volk
b7df0a14c6 parallelize events_before and events_after in api/client/context
Signed-off-by: Jason Volk <jason@zemos.net>
2024-12-04 00:51:57 +00:00
Jason Volk
320b0680bd pipeline various loops
Signed-off-by: Jason Volk <jason@zemos.net>
2024-12-03 13:25:33 +00:00
Jason Volk
4a3cc9fffa de-arc state_full_ids
Signed-off-by: Jason Volk <jason@zemos.net>
2024-11-30 08:38:12 +00:00
Jason Volk
6175e72f1c simplify get_pdu() interface; eliminate unconditional Arc
Signed-off-by: Jason Volk <jason@zemos.net>
2024-11-29 08:47:02 +00:00
Jason Volk
97ad9afc86 default to main event for batch tokens
fix prev_batch token for legacy sync timeline

Signed-off-by: Jason Volk <jason@zemos.net>
2024-11-24 21:47:25 +00:00
Jason Volk
3962333043 partially revert e507c31306
Signed-off-by: Jason Volk <jason@zemos.net>
2024-11-11 21:35:30 +00:00
Jason Volk
1f2e939fd5 optional arguments for timeline pdus iterations
Signed-off-by: Jason Volk <jason@zemos.net>
2024-11-08 08:22:54 +00:00
Jason Volk
e507c31306 make pdu batch tokens zeroith-indexed
Signed-off-by: Jason Volk <jason@zemos.net>
2024-11-08 06:06:18 +00:00
Jason Volk
9da523c004 refactor for stronger RawPduId type
implement standard traits for PduCount

enable serde for arrayvec

typedef various shortid's

pducount simplifications

split parts of pdu_metadata service to core/pdu and api/relations

remove some yields; improve var names/syntax

tweak types for limit timeline limit arguments

Signed-off-by: Jason Volk <jason@zemos.net>
2024-11-06 21:46:20 +00:00
Jason Volk
7a09ac81e0 split send from messages; refactor client/messages; add filters to client/context
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-28 20:52:52 -04:00
strawberry
a9e3e8f77a dont send non-state events from ignored users over /context/{eventId}
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-25 00:38:18 -04:00
Jason Volk
946ca364e0 Database Refactor
combine service/users data w/ mod unit

split sliding sync related out of service/users

instrument database entry points

remove increment crap from database interface

de-wrap all database get() calls

de-wrap all database insert() calls

de-wrap all database remove() calls

refactor database interface for async streaming

add query key serializer for database

implement Debug for result handle

add query deserializer for database

add deserialization trait for option handle

start a stream utils suite

de-wrap/asyncify/type-query count_one_time_keys()

de-wrap/asyncify users count

add admin query users command suite

de-wrap/asyncify users exists

de-wrap/partially asyncify user filter related

asyncify/de-wrap users device/keys related

asyncify/de-wrap user auth/misc related

asyncify/de-wrap users blurhash

asyncify/de-wrap account_data get; merge Data into Service

partial asyncify/de-wrap uiaa; merge Data into Service

partially asyncify/de-wrap transaction_ids get; merge Data into Service

partially asyncify/de-wrap key_backups; merge Data into Service

asyncify/de-wrap pusher service getters; merge Data into Service

asyncify/de-wrap rooms alias getters/some iterators

asyncify/de-wrap rooms directory getters/iterator

partially asyncify/de-wrap rooms lazy-loading

partially asyncify/de-wrap rooms metadata

asyncify/dewrap rooms outlier

asyncify/dewrap rooms pdu_metadata

dewrap/partially asyncify rooms read receipt

de-wrap rooms search service

de-wrap/partially asyncify rooms user service

partial de-wrap rooms state_compressor

de-wrap rooms state_cache

de-wrap room state et al

de-wrap rooms timeline service

additional users device/keys related

de-wrap/asyncify sender

asyncify services

refactor database to TryFuture/TryStream

refactor services for TryFuture/TryStream

asyncify api handlers

additional asyncification for admin module

abstract stream related; support reverse streams

additional stream conversions

asyncify state-res related

Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:32:30 -04:00
strawberry
dcaa96a79f sync: always include_redundant_members when using element_hacks feature
see:
- https://github.com/matrix-org/matrix-js-sdk/pull/4329
- 568051c0f0/synapse/handlers/pagination.py (L639)
- https://matrix.to/#/!n8DKU1BeeJilOJXDPr:seirdy.one/$gvGF7GuPrLPR8nHg4UiHvP-ZVwuiMkYS8O6VlsDCW9w?via=awawawawawawawawawawawawawawawawawawawawawawawawawawawawawawaw.gay&via=transfem.dev&via=matrix.org

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-07 12:07:01 -04:00
Jason Volk
8b6018d77d de-global services() from api
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 07:54:03 +00:00
Jason Volk
30e7298dd7 fix doc-lazy-continuation
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-16 07:24:51 +00:00
Jason Volk
f32380772f rename api::client_server to api::client
Signed-off-by: Jason Volk <jason@zemos.net>
2024-06-06 18:21:40 +00:00
Renamed from src/api/client_server/context.rs (Browse further)