Commit graph

349 commits

Author SHA1 Message Date
Matthias Ahouansou
49eb418786 feat: support /make_join and /send_join for restricted rooms
from https://gitlab.com/famedly/conduit/-/merge_requests/618

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-05 22:15:16 -04:00
Matthias Ahouansou
ed960f41ac feat: recurse relationships (and fix some lints)
from https://gitlab.com/famedly/conduit/-/merge_requests/613

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-05 22:15:16 -04:00
K900
8134dd9151 Reduce number of separate sources of truth for presence disabled-ness
Instead of checking if we should update every time we want to update,
call the updater every time and decide internally.
2024-04-03 12:52:46 -04:00
Matthias Ahouansou
c31fb7134a fix: do not expect that all http requests are valid reqwest requests
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-02 00:32:41 -04:00
Jason Volk
0ba8d1318d move presence up two levels out of rooms.edus and rooms.
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-02 00:32:41 -04:00
Jason Volk
9790477b0e move typing feature up one level out of rooms.edus.
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-02 00:32:41 -04:00
Jason Volk
89a919ce75 move read_receipt feature up one level out of rooms.edus.
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-02 00:32:41 -04:00
Jason Volk
3c09313f79 move and reorganize sending codepaths; no functional changes
Signed-off-by: Jason Volk <jason@zemos.net>
2024-04-02 00:32:41 -04:00
strawberry
fec4b3c953 delete conduit_bin feature
i dont know what's the point of this

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-02 00:32:41 -04:00
strawberry
a0ad911688 stop sending make_join requests after 50 failures
this is a very generous number

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-02 00:32:41 -04:00
strawberry
af6c72fa84 stop sending make_join if 15 servers responded with unsupported/invalid room version
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-02 00:32:41 -04:00
Matthias Ahouansou
c61aee4f1c fix: reject /register requests when there is no token and the type is appservice
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-02 00:32:41 -04:00
strawberry
7a1a271518 dont allow m.call.invite timeline events in public rooms
also simplifies the encrypted event check (we dont
need to convert anything here)

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-02 00:32:41 -04:00
strawberry
ff3bc3fb09 on new room creations: only allow moderators to call public rooms
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-02 00:32:41 -04:00
strawberry
72b60c4770 add lockdown_public_room_directory config option
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-04-02 00:32:41 -04:00
Jason Volk
18c34434bc add outgoing federation typing and conf items
Signed-off-by: Jason Volk <jason@zemos.net>
2024-03-30 22:06:18 -04:00
Jason Volk
4becbed2a7 refactor sending interface stack
Signed-off-by: Jason Volk <jason@zemos.net>
2024-03-30 22:06:18 -04:00
Jason Volk
f956e8c3b5 move and deduplicate read receipt flusher.
Signed-off-by: Jason Volk <jason@zemos.net>
2024-03-30 22:06:18 -04:00
strawberry
b36c397702 mark msc2285 (private read receipts) as supported
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-30 22:06:18 -04:00
strawberry
60623cd14b dont return bad_config for private room directory requests
this would log as an error and as HTTP 500

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-30 22:06:18 -04:00
strawberry
47889410eb use CONDUIT_VERSION_EXTRA in endpoints
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-30 22:06:18 -04:00
strawberry
cf8727a5f8 only test long_file_names_works if using sha256_media feature
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-30 22:06:18 -04:00
strawberry
98e480ddcd revert checking appserice destination against ip_range_denylist
this is the url field in the appservice registration file,
this is almost always localhost and the admin should
be vetting the appservice registration yaml file before
registering it anyways.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-30 22:06:18 -04:00
strawberry
8915b6469d forbid admin room from being made public
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-30 22:06:18 -04:00
strawberry
48d1a3af3c resolve the last few relevant pedantic clippy lints
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-30 22:06:18 -04:00
strawberry
fa71dd4b4c use body.dir for relations now
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-30 22:06:18 -04:00
strawberry
92dbe82675 remove unnecessary clone from into_iter
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-30 22:06:18 -04:00
strawberry
6aaf169c45 fix wrong order of logic, prefer room alias server first if available
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-30 22:06:18 -04:00
strawberry
e9793868ec add recursion_depth None for now
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-30 22:06:18 -04:00
strawberry
567b24e410 add /_conduwuit/server_version route
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-30 22:06:18 -04:00
Jason Volk
cb12f285e9 improve incoming http request and other logging
Signed-off-by: Jason Volk <jason@zemos.net>
2024-03-26 22:24:24 -04:00
strawberry
868976a149 use chain_width 60
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-26 22:24:24 -04:00
Jason Volk
f5da75e476 split structs from service/globals/mod.rs into separate units
Signed-off-by: Jason Volk <jason@zemos.net>
2024-03-26 22:24:24 -04:00
strawberry
24faf4dd26 revert 0297cfe307
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-26 22:24:24 -04:00
strawberry
3f9825788e check URL preview requests against ip_range_denylist
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-26 22:24:24 -04:00
strawberry
4be37fbe8d only remove event_id field in room v1 and v2
no this doesnt make those rooms work,
just a why not thing

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-26 22:24:24 -04:00
strawberry
0863bec098 allow non-joined users to get aliases of world_readable rooms
`user_can_see_state_events` checks if user is joined,
or if room visibility is world_readable

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-26 22:24:24 -04:00
strawberry
32ab88e68a check the URL and response remote address for ip_range_denylist
the previous only checked the server_name

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-26 22:24:24 -04:00
strawberry
fbefbd57be implement include_state search criteria
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-26 22:24:24 -04:00
strawberry
c2e89b939c add element web search count hack (?)
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-26 22:24:24 -04:00
strawberry
f4146de17d add feature for smElement client hacks
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-26 22:24:24 -04:00
strawberry
7bd56765ef fix some more pedantic clippy lints
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-26 22:24:24 -04:00
strawberry
27d6ce3cc5 log path parameters when try http request fails
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-23 01:49:27 -04:00
strawberry
7fbbdf83ab forgot to fix these ones too
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-23 01:49:27 -04:00
strawberry
3bc2af7d26 resolve and add even more pedantic clippy lints
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-23 01:49:27 -04:00
strawberry
0bb5115bd1 resolve clippy match_bool
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-23 01:49:27 -04:00
strawberry
9d0b647911 resolve couple pedantic clippy lints, remove unnecessary qualifications
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-23 01:49:27 -04:00
Matthias Ahouansou
60f2471f59 refactor appservice type stuff
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-03-23 01:49:27 -04:00
Jason Volk
9334f938ae refactor reqwest client suite w/ conf items.
Signed-off-by: Jason Volk <jason@zemos.net>
2024-03-23 01:49:27 -04:00
Jason Volk
61b1d6d869 add corks to coalesce writes for several heavy calltrees.
Signed-off-by: Jason Volk <jason@zemos.net>
2024-03-23 01:49:27 -04:00