Charles Hall
51b30d9ba3
largely stop using RoomCreateEventContent
...
This became a problem because #foundation-office:matrix.org has a
malformed create event with its `predecessor` set to a string instead of
a map.
The solution to this is, unfortunately, to do more shotgun parsing to
extract only the desired fields rather than trying to parse the entire
content every time. To prevent this kind of problem from happening
again, `RoomCreateEventContent` must only be used for creating new PDUs,
existing PDUs must be shotgun-parsed.
2024-11-08 20:36:46 -08:00
Charles Hall
a4e1522875
generalize get_room_version
...
There are other fields of `m.room.create` events that are useful to
individually extract without caring about the values of other fields.
2024-11-08 18:38:16 -08:00
Charles Hall
f771d319b2
add constructor for spaces service
...
Also adds a public function to invalidate the cache rather than exposing
the entire cache publicly.
2024-11-01 14:25:52 -07:00
Charles Hall
5a490a4397
fix mod/use order
...
Yes, it does actually bother me, thanks for asking.
2024-10-03 15:28:24 -07:00
mikoto
287f6b9163
refactor calculate_invite_state
...
That was terribly named and terribly implemented.
Co-authored-by: Charles Hall <charles@computer.surgery>
2024-10-03 10:52:07 -07:00
Lambda
b0f33207fe
Add wrapper types for short IDs
2024-09-06 17:20:14 +00:00
Lambda
f1642c92d1
Take iterator in calculate_hash()
...
Avoids unnecessary allocations.
2024-09-06 17:20:14 +00:00
Lambda
341f4213d0
Use self instead of going through services()
2024-09-05 19:42:37 +00:00
Lambda
34ccb2cd06
Use TokenSet for roomid_mutex_state
2024-07-22 18:07:03 +00:00
Charles Hall
d2fc2fad1f
fix service/rooms/state events
2024-07-16 11:12:08 -07:00
Lambda
edfccea30a
Convert giant tuple in state_compressor to struct
2024-05-20 21:27:57 +00:00
Lambda
5172f66c1a
More useful tracing spans
2024-05-20 16:49:45 +00:00
Charles Hall
0afc1d2f50
change rustfmt configuration
...
This change is fully automated, except the `rustfmt.toml` changes and
a few clippy directives to allow specific functions with too many lines
because they are longer now.
2024-05-16 19:11:40 -07:00
Charles Hall
1911ad34d9
stop putting comments and code on the same line
2024-05-16 15:22:35 -07:00
Charles Hall
9606f59141
enable manual_let_else lint
2024-05-14 20:01:23 -07:00
Charles Hall
d748544f0e
enable unreachable_pub lint
...
This causes some other lints to start firing too (which is good), but
I'm going to fix them in follow-up commits to keep things organized.
2024-05-12 18:51:26 -07:00
Charles Hall
a626e7b0f0
enable mod_module_files lint
2024-05-12 18:51:26 -07:00