Commit graph

4071 commits

Author SHA1 Message Date
Jason Volk 7397064edd fix arithmetic side-effects
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-08 22:02:09 +00:00
Jason Volk 52a561ff9e abstract expoential backoff to math utils.
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-08 22:02:09 +00:00
Jason Volk 5e72d36800 add math utils; integrate checked expression macros
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-08 22:02:09 +00:00
Jason Volk 611f09829e use shorthand constraint syntax and formatting
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-08 22:02:09 +00:00
Jason Volk a388c2e06e allow clippy::enum_glob_use
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-08 22:02:09 +00:00
Jason Volk 24b37e03a0 add pretty time util
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-08 22:02:09 +00:00
Jason Volk a309ef55c9 restore signal state after channel failures
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-08 22:02:09 +00:00
AlexPewMaster c1c084dda1 Introduce a new way of deploying conduwuit using caddy in Docker 2024-07-08 17:59:59 -04:00
strawberry 72d9e8ed2b bump conduwuit version to 0.4.5
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-07-07 14:32:41 -04:00
Jason Volk a3638dbb15 use rwlock for command handler.
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-07 06:24:08 +00:00
Jason Volk 5254eb4f72 add basic tab completion to console
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-07 06:24:08 +00:00
Jason Volk b31e81a469 add common_prefix string util
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-06 15:26:07 +00:00
Jason Volk 0e580292a6 encap admin handler init/fini in crate
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-06 15:26:07 +00:00
Jason Volk 38a24e0170 remove unused deps in member crates
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-06 15:26:07 +00:00
Jason Volk 8350aced39 add ctrl-\ quit support to admin console
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-06 15:26:07 +00:00
Jason Volk 04e3de08eb add log to error functors for Result::map_or_else
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-06 15:26:07 +00:00
Christoph Dittmann 2bc53139fa Don't send empty presence EDUs
I run a homeserver whose logs show a high number of incoming empty
presence EDUs originating from the user agent "Conduwuit/0.4.4". They
arrive at a rate of about 2 queries per second per Conduwuit server.

The empty EDUs all look the same, only with `origin_server_ts`
increasing:

```
{"origin":"example.com","origin_server_ts":1720266475601,"edus":[{"edu_type":"m.presence","content":{"push":[]}}]}
```

These updates are unnecessary because they don't do anything. They
only increase network traffic and CPU usage on both sides.

After this commit, the empty presence updates are no longer inserted
into the outgoing event queue.
2024-07-06 14:13:33 +02:00
strawberry 8691141237 ci: try running nix-build-and-cache prior dynamic build test
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-07-05 02:48:36 -04:00
Jason Volk 17a3ed4c56 add admin query resolver commands
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-04 22:15:54 +00:00
Jason Volk 2dd68d3fa5 add time format string util
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-04 21:06:35 +00:00
Jason Volk dc18f89c0b don't cache server name lookups indefinitely (#436)
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-04 21:06:35 +00:00
Jason Volk eaf1cf38a5 refactor resolver tuples into structs
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-04 21:06:35 +00:00
Jason Volk eeda96d94a inline analysis and symbol reduction; emits smaller than 64 bytes marked inline
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-04 21:06:35 +00:00
Jason Volk 1e8b8cce0f even more byte utils optimizations
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-04 21:06:35 +00:00
Jason Volk db46d6dd6b optimize millis_since_unix_epoch()
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-04 21:06:35 +00:00
Jason Volk 08274150e5 cork database during global counter increment
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-04 21:06:35 +00:00
Jason Volk e125af620e impl crate::Service for Service
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-04 21:06:35 +00:00
Jason Volk 177c9e8bfa add split_once_infallible string util
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-04 21:06:35 +00:00
Jason Volk 4f5c6de853 start rand utils suite
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-04 21:06:35 +00:00
Jason Volk 25c004f08c remove dead cache
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-04 21:06:35 +00:00
Jason Volk f104ced55d remove unnecessary wrapper
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-04 21:06:35 +00:00
Jason Volk 0cea64309a move PduEvent from services to core
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-04 21:06:35 +00:00
strawberry 229f2fde7a skip 2 more flakey complement tests still
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-07-04 11:17:13 -04:00
strawberry 9a0ffd55da skip complement test TestClientSpacesSummary still
too flakey still

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-07-04 01:55:22 -04:00
renovate[bot] d1b3faf4bd Update Rust crate sd-notify to v0.4.2 2024-07-03 23:02:44 -04:00
strawberry 4014cb4413 document emergency_password
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-07-03 23:02:44 -04:00
strawberry b2dbc3bc10 update complement results
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-07-03 23:02:38 -04:00
strawberry e2033fb6c1 notify users to update their build scripts if using rocksdb or sha256_media
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-07-03 22:12:47 -04:00
strawberry 6b433392a4 slight docs updates
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-07-03 22:12:47 -04:00
strawberry 0832c28a40 dedupe some state accessors in various places
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-07-03 22:12:47 -04:00
strawberry b0eec60724 add MSC3266 room summary API support
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-07-03 22:12:47 -04:00
strawberry 82acc7c0b0 ci: add back ubuntu free disk space
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-07-03 22:12:47 -04:00
strawberry c9384e9c78 allow all complement tests again
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-07-03 22:12:45 -04:00
strawberry 3502e6ef87 bump conduwuit to 0.4.4
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-07-03 11:30:16 -04:00
strawberry deca2c52c6 switch to ruma's X-Matrix parser
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-07-03 11:30:16 -04:00
strawberry daa46a0dc4 auto-fix some markdown lints
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-07-03 11:30:16 -04:00
strawberry 74791642c1 add markdownlint and run lychee in documentation CI workflow
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-07-03 11:30:16 -04:00
strawberry 1a64e42cfe add /openid/request_token and /openid/userinfo routes
heavily changed and improved by me

Co-authored-by: mikoto <avdb@keemail.me>
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-07-03 11:30:11 -04:00
Jason Volk 5edd391e83 support admin server restart --force
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-03 06:34:16 +00:00
Jason Volk 7658387a74 remove resolver wrapper; use std mutex
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-03 06:34:16 +00:00