Commit Graph

4404 Commits

Author SHA1 Message Date
Jason Volk 814b9e28b6 fix unnecessary re-serializations
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-26 18:50:28 -04:00
strawberry 8eec78e9e0 mark the server user bot as online/offline on shutdown/startup
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-25 00:38:45 -04:00
morguldir 9eace1fbbb fix sliding sync room type filter regression
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-25 00:38:45 -04:00
Jason Volk ba683cf534 fix aliasid_alias key deserialization
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:38:45 -04:00
Jason Volk bd9a9cc5f8 fix trait-solver issue requiring recursion_limit increase
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:38:45 -04:00
Jason Volk 2d049dacc3 fix get_all_media_keys deserialization
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:38:45 -04:00
Jason Volk c6b7c24e99 consume all bytes for top-level Ignore; add comments/tweaks
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:38:45 -04:00
strawberry fa7c1200b5 miniscule spaces code optimisations
still terrible though

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-25 00:38:45 -04:00
strawberry bd56d83045 fix room directory regression
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-25 00:38:45 -04:00
strawberry ab9a65db5d add MSC4151 room reporting support
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-25 00:38:45 -04:00
strawberry 54a107c3c4 drop unnecessary error to debug_warn
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-25 00:38:45 -04:00
strawberry 98363852b1 fix: dont add remote users for push targets, use hashset instead of vec
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-25 00:38:45 -04:00
strawberry 4eb7ad79d1 update last_seen_ip and last_seen_ts on updating device metadata
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-25 00:38:45 -04:00
strawberry 115ea03edf remove unnecessary full type annos
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-25 00:38:18 -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
strawberry 6a81bf23de dont send events from ignored users over /messages
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-25 00:38:18 -04:00
strawberry 7a59add8f1 add support for reading a registration token from a file
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-25 00:38:18 -04:00
strawberry ee1580e480 fix list_rooms admin command filters
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-25 00:38:18 -04:00
strawberry b64a235165 use ok_or_else for a rare error
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-25 00:38:18 -04:00
strawberry 4413793f7e dont allow sending/receiving room invites with ignored users
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-25 00:38:18 -04:00
strawberry 2083c38c76 dont send non-state events from ignored users over sync
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-25 00:38:18 -04:00
strawberry 890ee84f71 dont send read receipts and typing indicators from ignored users
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-25 00:38:18 -04:00
strawberry fafe320899 send EDUs to appservices if in events
to_device is not supported yet

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-25 00:38:14 -04:00
strawberry 8311952629 bump ruma, cargo.lock, and deps
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-25 00:37:15 -04:00
Jason Volk 36677bb982 optimize auth_chain short_id to event_id translation step
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:36:30 -04:00
Jason Volk ab06701ed0 refactor multi-get to handle result type
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:36:30 -04:00
Jason Volk 26dcab272d various cleanup tweaks/fixes
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:36:30 -04:00
Jason Volk 96fcf7f94d add rocksdb secondary; fix read_only mode.
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:36:30 -04:00
Jason Volk 6b80361c31 additional stream tools
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:36:30 -04:00
Jason Volk a8d5cf9651 Add rocksdb logging integration with tracing.
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:36:30 -04:00
Jason Volk c569881b08 merge rooms/short Data w/ Service; optimize queries
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:36:28 -04:00
Jason Volk 0e8ae1e13e add ArrayVec-backed serialized query overload; doc comments
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:32:33 -04:00
Jason Volk 5192927a53 split remaining map suites
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:32:33 -04:00
strawberry 4496cf2d5b add missing await to first admin room creation
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-25 00:32:33 -04:00
Jason Volk 3f7ec4221d minor auth_chain optimizations/cleanup
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:32:33 -04:00
Jason Volk 4776fe66c4 handle serde_json for deserialized()
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:32:33 -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
Jason Volk 6001014078 add UnwrapInfallible to Result
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:15:01 -04:00
Jason Volk a5de27442a re-export crates used by error macros
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:15:01 -04:00
Jason Volk f7ce4db0b0 add is_not_found functor to error; tweak status code matcher
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:15:01 -04:00
Jason Volk a5822ebc27 add missing err! case
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:15:01 -04:00
Jason Volk 63053640f1 add util functors for is_zero/is_equal; move clamp to math utils
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:15:01 -04:00
Jason Volk bd75ff65c9 move common_elements util into unit
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:15:01 -04:00
Jason Volk aa265f7ca4 add err log trait to Result
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:15:01 -04:00
Jason Volk 3d4b0f10a5 add expected! macro to checked math expression suite
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:15:01 -04:00
Jason Volk 2709995f84 add MapExpect to Result
add DebugInspect to Result

move Result typedef into unit

Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:15:01 -04:00
Jason Volk 99ad404ea9 add str traits for split, between, unquote; consolidate tests
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:15:01 -04:00
Jason Volk 2db017af37 simplify service trait bounds and lifetimes
Signed-off-by: Jason Volk <jason@zemos.net>
2024-10-25 00:15:01 -04:00
strawberry 16014e1594
remove `ProcSubset=pid` from systemd units for now
they appear to cause strange rust malloc issues on Debian systems

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 23:51:02 -04:00
strawberry 7e828440f9
allow conduit database version 16
Conduit bumped the database version to 16, but did not introduce any
breaking changes. Their database migrations are extremely fragile and risky,
and also do not really apply to us, so just to retain Conduit -> conduwuit
compatibility we'll check for both versions.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 23:44:15 -04:00