Commit graph

4290 commits

Author SHA1 Message Date
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
strawberry f6918833d7
remove -unknown- from nix flake
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 23:04:14 -04:00
strawberry 4d7bbe9fb4 tiny micro-optimisations in some config stuff
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 22:37:40 -04:00
strawberry 75be68fa61
add config option to control sending admin notices of alerts
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 22:37:34 -04:00
strawberry 0760150822
cache all 3 x86_64 nix devshells in CI
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 22:08:23 -04:00
strawberry 37a2ba59d0 improve UX of admin media deletion commands, ignore errors by default, support deleting local media too
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 22:02:58 -04:00
strawberry 724711218a add note that ko-fi takes a fee
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 22:02:58 -04:00
strawberry 359fb25262
add missing feat_sha256_media to fresh database creations
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 22:02:51 -04:00
strawberry 9761e2f10c
fix lockdown_public_room_directory bypass, add appservice exclusion
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 21:38:26 -04:00
strawberry 30e3e45f9f
misc CI improvements, build macOS binaries, flake improvements/fixes
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 21:29:17 -04:00
strawberry e5efd55838 feature-gate direct TLS mode to make rustls/aws-lc-rs optional
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 20:54:21 -04:00
strawberry 87734a074f add m.call and m.call.member to list of permissions to set on public rooms
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 20:53:31 -04:00
strawberry a7c4a7933d disable log colours in the complement config
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 20:52:14 -04:00
strawberry 83becf013c add config option to disable ANSI log colours
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 20:51:54 -04:00
strawberry acb9eae707 add back server name to error sending PDU to remote server
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-10-24 20:51:50 -04:00