mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-28 11:27:35 +00:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
69a08ffbf6 | ||
|
|
123aa2456c | ||
|
|
c3f6c73ac4 | ||
|
|
1730cc9ff3 |
No files matched your search
Generated
+18
-17
@@ -445,14 +445,13 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "axum-extra"
|
name = "axum-extra"
|
||||||
version = "0.12.5"
|
version = "0.10.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "fef252edff26ddba56bbcdf2ee3307b8129acb86f5749b68990c168a6fcc9c76"
|
checksum = "9963ff19f40c6102c76756ef0a46004c0d58957d87259fc9208ff8441c12ab96"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"axum",
|
"axum",
|
||||||
"axum-core",
|
"axum-core",
|
||||||
"bytes",
|
"bytes",
|
||||||
"futures-core",
|
|
||||||
"futures-util",
|
"futures-util",
|
||||||
"headers",
|
"headers",
|
||||||
"http",
|
"http",
|
||||||
@@ -460,6 +459,8 @@ dependencies = [
|
|||||||
"http-body-util",
|
"http-body-util",
|
||||||
"mime",
|
"mime",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
|
"rustversion",
|
||||||
|
"serde_core",
|
||||||
"tower-layer",
|
"tower-layer",
|
||||||
"tower-service",
|
"tower-service",
|
||||||
"tracing",
|
"tracing",
|
||||||
@@ -1221,7 +1222,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "continuwuity-admin-api"
|
name = "continuwuity-admin-api"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf#a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf"
|
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=e087ff15888156942ca2ffe6097d1b4c3fd27628#e087ff15888156942ca2ffe6097d1b4c3fd27628"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ruma-common",
|
"ruma-common",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -1600,7 +1601,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "draupnir-antispam"
|
name = "draupnir-antispam"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf#a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf"
|
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=e087ff15888156942ca2ffe6097d1b4c3fd27628#e087ff15888156942ca2ffe6097d1b4c3fd27628"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ruma-common",
|
"ruma-common",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -3002,7 +3003,7 @@ checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "meowlnir-antispam"
|
name = "meowlnir-antispam"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf#a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf"
|
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=e087ff15888156942ca2ffe6097d1b4c3fd27628#e087ff15888156942ca2ffe6097d1b4c3fd27628"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ruma-common",
|
"ruma-common",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -4094,7 +4095,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma"
|
name = "ruma"
|
||||||
version = "0.10.1"
|
version = "0.10.1"
|
||||||
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf#a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf"
|
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=e087ff15888156942ca2ffe6097d1b4c3fd27628#e087ff15888156942ca2ffe6097d1b4c3fd27628"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"assign",
|
"assign",
|
||||||
"continuwuity-admin-api",
|
"continuwuity-admin-api",
|
||||||
@@ -4117,7 +4118,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-appservice-api"
|
name = "ruma-appservice-api"
|
||||||
version = "0.10.0"
|
version = "0.10.0"
|
||||||
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf#a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf"
|
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=e087ff15888156942ca2ffe6097d1b4c3fd27628#e087ff15888156942ca2ffe6097d1b4c3fd27628"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"js_int",
|
"js_int",
|
||||||
"ruma-common",
|
"ruma-common",
|
||||||
@@ -4129,7 +4130,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-client-api"
|
name = "ruma-client-api"
|
||||||
version = "0.18.0"
|
version = "0.18.0"
|
||||||
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf#a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf"
|
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=e087ff15888156942ca2ffe6097d1b4c3fd27628#e087ff15888156942ca2ffe6097d1b4c3fd27628"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"as_variant",
|
"as_variant",
|
||||||
"assign",
|
"assign",
|
||||||
@@ -4152,7 +4153,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-common"
|
name = "ruma-common"
|
||||||
version = "0.13.0"
|
version = "0.13.0"
|
||||||
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf#a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf"
|
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=e087ff15888156942ca2ffe6097d1b4c3fd27628#e087ff15888156942ca2ffe6097d1b4c3fd27628"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"as_variant",
|
"as_variant",
|
||||||
"base64 0.22.1",
|
"base64 0.22.1",
|
||||||
@@ -4184,7 +4185,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-events"
|
name = "ruma-events"
|
||||||
version = "0.28.1"
|
version = "0.28.1"
|
||||||
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf#a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf"
|
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=e087ff15888156942ca2ffe6097d1b4c3fd27628#e087ff15888156942ca2ffe6097d1b4c3fd27628"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"as_variant",
|
"as_variant",
|
||||||
"indexmap",
|
"indexmap",
|
||||||
@@ -4209,7 +4210,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-federation-api"
|
name = "ruma-federation-api"
|
||||||
version = "0.9.0"
|
version = "0.9.0"
|
||||||
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf#a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf"
|
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=e087ff15888156942ca2ffe6097d1b4c3fd27628#e087ff15888156942ca2ffe6097d1b4c3fd27628"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"headers",
|
"headers",
|
||||||
@@ -4231,7 +4232,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-identifiers-validation"
|
name = "ruma-identifiers-validation"
|
||||||
version = "0.9.5"
|
version = "0.9.5"
|
||||||
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf#a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf"
|
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=e087ff15888156942ca2ffe6097d1b4c3fd27628#e087ff15888156942ca2ffe6097d1b4c3fd27628"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"js_int",
|
"js_int",
|
||||||
"thiserror 2.0.18",
|
"thiserror 2.0.18",
|
||||||
@@ -4240,7 +4241,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-identity-service-api"
|
name = "ruma-identity-service-api"
|
||||||
version = "0.9.0"
|
version = "0.9.0"
|
||||||
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf#a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf"
|
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=e087ff15888156942ca2ffe6097d1b4c3fd27628#e087ff15888156942ca2ffe6097d1b4c3fd27628"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"js_int",
|
"js_int",
|
||||||
"ruma-common",
|
"ruma-common",
|
||||||
@@ -4250,7 +4251,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-macros"
|
name = "ruma-macros"
|
||||||
version = "0.13.0"
|
version = "0.13.0"
|
||||||
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf#a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf"
|
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=e087ff15888156942ca2ffe6097d1b4c3fd27628#e087ff15888156942ca2ffe6097d1b4c3fd27628"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"proc-macro-crate",
|
"proc-macro-crate",
|
||||||
@@ -4265,7 +4266,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-push-gateway-api"
|
name = "ruma-push-gateway-api"
|
||||||
version = "0.9.0"
|
version = "0.9.0"
|
||||||
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf#a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf"
|
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=e087ff15888156942ca2ffe6097d1b4c3fd27628#e087ff15888156942ca2ffe6097d1b4c3fd27628"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"js_int",
|
"js_int",
|
||||||
"ruma-common",
|
"ruma-common",
|
||||||
@@ -4277,7 +4278,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "ruma-signatures"
|
name = "ruma-signatures"
|
||||||
version = "0.15.0"
|
version = "0.15.0"
|
||||||
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf#a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf"
|
source = "git+https://forgejo.ellis.link/continuwuation/ruwuma?rev=e087ff15888156942ca2ffe6097d1b4c3fd27628#e087ff15888156942ca2ffe6097d1b4c3fd27628"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.22.1",
|
"base64 0.22.1",
|
||||||
"ed25519-dalek",
|
"ed25519-dalek",
|
||||||
|
|||||||
+2
-2
@@ -97,7 +97,7 @@ features = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[workspace.dependencies.axum-extra]
|
[workspace.dependencies.axum-extra]
|
||||||
version = "0.12.0"
|
version = "0.10.1"
|
||||||
default-features = false
|
default-features = false
|
||||||
features = ["typed-header", "tracing"]
|
features = ["typed-header", "tracing"]
|
||||||
|
|
||||||
@@ -343,7 +343,7 @@ version = "0.1.2"
|
|||||||
[workspace.dependencies.ruma]
|
[workspace.dependencies.ruma]
|
||||||
git = "https://forgejo.ellis.link/continuwuation/ruwuma"
|
git = "https://forgejo.ellis.link/continuwuation/ruwuma"
|
||||||
#branch = "conduwuit-changes"
|
#branch = "conduwuit-changes"
|
||||||
rev = "a4b5e89f4951c87e903ef224c2d1c2c4ef1ebeaf"
|
rev = "e087ff15888156942ca2ffe6097d1b4c3fd27628"
|
||||||
features = [
|
features = [
|
||||||
"compat",
|
"compat",
|
||||||
"rand",
|
"rand",
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
Implement MSC4143 MatrixRTC transport discovery endpoint. Move RTC foci configuration from `[global.well_known]` to a new `[global.matrix_rtc]` section with a `foci` field. Contributed by @0xnim
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Fixed sliding sync v5 list ranges always starting from 0, causing extra rooms to be unnecessarily processed and returned. Contributed by @0xnim
|
|
||||||
+6
-22
@@ -1844,13 +1844,14 @@
|
|||||||
#
|
#
|
||||||
#support_mxid =
|
#support_mxid =
|
||||||
|
|
||||||
# **DEPRECATED**: Use `[global.matrix_rtc].foci` instead.
|
|
||||||
#
|
|
||||||
# A list of MatrixRTC foci URLs which will be served as part of the
|
# A list of MatrixRTC foci URLs which will be served as part of the
|
||||||
# MSC4143 client endpoint at /.well-known/matrix/client.
|
# MSC4143 client endpoint at /.well-known/matrix/client. If you're
|
||||||
|
# setting up livekit, you'd want something like:
|
||||||
|
# rtc_focus_server_urls = [
|
||||||
|
# { type = "livekit", livekit_service_url = "https://livekit.example.com" },
|
||||||
|
# ]
|
||||||
#
|
#
|
||||||
# This option is deprecated and will be removed in a future release.
|
# To disable, set this to be an empty vector (`[]`).
|
||||||
# Please migrate to the new `[global.matrix_rtc]` config section.
|
|
||||||
#
|
#
|
||||||
#rtc_focus_server_urls = []
|
#rtc_focus_server_urls = []
|
||||||
|
|
||||||
@@ -1872,23 +1873,6 @@
|
|||||||
#
|
#
|
||||||
#blurhash_max_raw_size = 33554432
|
#blurhash_max_raw_size = 33554432
|
||||||
|
|
||||||
[global.matrix_rtc]
|
|
||||||
|
|
||||||
# A list of MatrixRTC foci (transports) which will be served via the
|
|
||||||
# MSC4143 RTC transports endpoint at
|
|
||||||
# `/_matrix/client/v1/rtc/transports`. If you're setting up livekit,
|
|
||||||
# you'd want something like:
|
|
||||||
# ```toml
|
|
||||||
# [global.matrix_rtc]
|
|
||||||
# foci = [
|
|
||||||
# { type = "livekit", livekit_service_url = "https://livekit.example.com" },
|
|
||||||
# ]
|
|
||||||
# ```
|
|
||||||
#
|
|
||||||
# To disable, set this to an empty list (`[]`).
|
|
||||||
#
|
|
||||||
#foci = []
|
|
||||||
|
|
||||||
[global.ldap]
|
[global.ldap]
|
||||||
|
|
||||||
# Whether to enable LDAP login.
|
# Whether to enable LDAP login.
|
||||||
|
|||||||
+32
-4
@@ -78,19 +78,47 @@ You will need to allow ports `7881/tcp` and `50100:50200/udp` through your firew
|
|||||||
|
|
||||||
### 3. Telling clients where to find LiveKit
|
### 3. Telling clients where to find LiveKit
|
||||||
|
|
||||||
To tell clients where to find LiveKit, you need to add the address of your `lk-jwt-service` to the `[global.matrix_rtc]` config section using the `foci` option.
|
To tell clients where to find LiveKit, you need to add the address of your `lk-jwt-service` to your client .well-known file. To do so, in the config section `global.well-known`, add (or modify) the option `rtc_focus_server_urls`.
|
||||||
|
|
||||||
The variable should be a list of servers serving as MatrixRTC endpoints. Clients discover these via the `/_matrix/client/v1/rtc/transports` endpoint (MSC4143).
|
The variable should be a list of servers serving as MatrixRTC endpoints to serve in the well-known file to the client.
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[global.matrix_rtc]
|
rtc_focus_server_urls = [
|
||||||
foci = [
|
|
||||||
{ type = "livekit", livekit_service_url = "https://livekit.example.com" },
|
{ type = "livekit", livekit_service_url = "https://livekit.example.com" },
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
Remember to replace the URL with the address you are deploying your instance of lk-jwt-service to.
|
Remember to replace the URL with the address you are deploying your instance of lk-jwt-service to.
|
||||||
|
|
||||||
|
#### Serving .well-known manually
|
||||||
|
|
||||||
|
If you don't let Continuwuity serve your `.well-known` files, you need to add the following lines to your `.well-known/matrix/client` file, remembering to replace the URL with your own `lk-jwt-service` deployment:
|
||||||
|
|
||||||
|
```json
|
||||||
|
"org.matrix.msc4143.rtc_foci": [
|
||||||
|
{
|
||||||
|
"type": "livekit",
|
||||||
|
"livekit_service_url": "https://livekit.example.com"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
The final file should look something like this:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"m.homeserver": {
|
||||||
|
"base_url":"https://matrix.example.com"
|
||||||
|
},
|
||||||
|
"org.matrix.msc4143.rtc_foci": [
|
||||||
|
{
|
||||||
|
"type": "livekit",
|
||||||
|
"livekit_service_url": "https://livekit.example.com"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
### 4. Configure your Reverse Proxy
|
### 4. Configure your Reverse Proxy
|
||||||
|
|
||||||
Reverse proxies can be configured in many different ways - so we can't provide a step by step for this.
|
Reverse proxies can be configured in many different ways - so we can't provide a step by step for this.
|
||||||
|
|||||||
@@ -29,9 +29,7 @@ pub(super) async fn delete(
|
|||||||
.delete(&mxc.as_str().try_into()?)
|
.delete(&mxc.as_str().try_into()?)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
return self
|
return Err!("Deleted the MXC from our database and on our filesystem.",);
|
||||||
.write_str("Deleted the MXC from our database and on our filesystem.")
|
|
||||||
.await;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(event_id) = event_id {
|
if let Some(event_id) = event_id {
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ pub(super) async fn load_joined_room(
|
|||||||
and `join*` functions are used to perform steps in parallel which do not depend on each other.
|
and `join*` functions are used to perform steps in parallel which do not depend on each other.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
let insert_lock = services.rooms.timeline.mutex_insert.lock(room_id).await;
|
||||||
|
drop(insert_lock);
|
||||||
let (
|
let (
|
||||||
account_data,
|
account_data,
|
||||||
ephemeral,
|
ephemeral,
|
||||||
@@ -270,7 +272,7 @@ async fn build_state_and_timeline(
|
|||||||
// joined since the last sync, that being the syncing user's join event. if
|
// joined since the last sync, that being the syncing user's join event. if
|
||||||
// it's empty something is wrong.
|
// it's empty something is wrong.
|
||||||
if joined_since_last_sync && timeline.pdus.is_empty() {
|
if joined_since_last_sync && timeline.pdus.is_empty() {
|
||||||
warn!("timeline for newly joined room is empty");
|
debug_warn!("timeline for newly joined room is empty");
|
||||||
}
|
}
|
||||||
|
|
||||||
let (summary, device_list_updates) = try_join(
|
let (summary, device_list_updates) = try_join(
|
||||||
|
|||||||
@@ -336,9 +336,7 @@ where
|
|||||||
let ranges = list.ranges.clone();
|
let ranges = list.ranges.clone();
|
||||||
|
|
||||||
for mut range in ranges {
|
for mut range in ranges {
|
||||||
range.0 = range
|
range.0 = uint!(0);
|
||||||
.0
|
|
||||||
.min(UInt::try_from(active_rooms.len()).unwrap_or(UInt::MAX));
|
|
||||||
range.1 = range.1.checked_add(uint!(1)).unwrap_or(range.1);
|
range.1 = range.1.checked_add(uint!(1)).unwrap_or(range.1);
|
||||||
range.1 = range
|
range.1 = range
|
||||||
.1
|
.1
|
||||||
|
|||||||
@@ -27,32 +27,10 @@ pub(crate) async fn well_known_client(
|
|||||||
identity_server: None,
|
identity_server: None,
|
||||||
sliding_sync_proxy: Some(SlidingSyncProxyInfo { url: client_url }),
|
sliding_sync_proxy: Some(SlidingSyncProxyInfo { url: client_url }),
|
||||||
tile_server: None,
|
tile_server: None,
|
||||||
rtc_foci: services
|
rtc_foci: services.config.well_known.rtc_focus_server_urls.clone(),
|
||||||
.config
|
|
||||||
.matrix_rtc
|
|
||||||
.effective_foci(&services.config.well_known.rtc_focus_server_urls)
|
|
||||||
.to_vec(),
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/// # `GET /_matrix/client/v1/rtc/transports`
|
|
||||||
/// # `GET /_matrix/client/unstable/org.matrix.msc4143/rtc/transports`
|
|
||||||
///
|
|
||||||
/// Returns the list of MatrixRTC foci (transports) configured for this
|
|
||||||
/// homeserver, implementing MSC4143.
|
|
||||||
pub(crate) async fn get_rtc_transports(
|
|
||||||
State(services): State<crate::State>,
|
|
||||||
_body: Ruma<ruma::api::client::discovery::get_rtc_transports::Request>,
|
|
||||||
) -> Result<ruma::api::client::discovery::get_rtc_transports::Response> {
|
|
||||||
Ok(ruma::api::client::discovery::get_rtc_transports::Response::new(
|
|
||||||
services
|
|
||||||
.config
|
|
||||||
.matrix_rtc
|
|
||||||
.effective_foci(&services.config.well_known.rtc_focus_server_urls)
|
|
||||||
.to_vec(),
|
|
||||||
))
|
|
||||||
}
|
|
||||||
|
|
||||||
/// # `GET /.well-known/matrix/support`
|
/// # `GET /.well-known/matrix/support`
|
||||||
///
|
///
|
||||||
/// Server support contact and support page of a homeserver's domain.
|
/// Server support contact and support page of a homeserver's domain.
|
||||||
|
|||||||
@@ -184,7 +184,6 @@ pub fn build(router: Router<State>, server: &Server) -> Router<State> {
|
|||||||
.ruma_route(&client::put_suspended_status)
|
.ruma_route(&client::put_suspended_status)
|
||||||
.ruma_route(&client::well_known_support)
|
.ruma_route(&client::well_known_support)
|
||||||
.ruma_route(&client::well_known_client)
|
.ruma_route(&client::well_known_client)
|
||||||
.ruma_route(&client::get_rtc_transports)
|
|
||||||
.route("/_conduwuit/server_version", get(client::conduwuit_server_version))
|
.route("/_conduwuit/server_version", get(client::conduwuit_server_version))
|
||||||
.route("/_continuwuity/server_version", get(client::conduwuit_server_version))
|
.route("/_continuwuity/server_version", get(client::conduwuit_server_version))
|
||||||
.ruma_route(&client::room_initial_sync_route)
|
.ruma_route(&client::room_initial_sync_route)
|
||||||
|
|||||||
+10
-50
@@ -2080,12 +2080,6 @@ pub struct Config {
|
|||||||
/// display: nested
|
/// display: nested
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub blurhashing: BlurhashConfig,
|
pub blurhashing: BlurhashConfig,
|
||||||
|
|
||||||
/// Configuration for MatrixRTC (MSC4143) transport discovery.
|
|
||||||
/// display: nested
|
|
||||||
#[serde(default)]
|
|
||||||
pub matrix_rtc: MatrixRtcConfig,
|
|
||||||
|
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
#[allow(clippy::zero_sized_map_values)]
|
#[allow(clippy::zero_sized_map_values)]
|
||||||
// this is a catchall, the map shouldn't be zero at runtime
|
// this is a catchall, the map shouldn't be zero at runtime
|
||||||
@@ -2151,16 +2145,17 @@ pub struct WellKnownConfig {
|
|||||||
/// listed.
|
/// listed.
|
||||||
pub support_mxid: Option<OwnedUserId>,
|
pub support_mxid: Option<OwnedUserId>,
|
||||||
|
|
||||||
/// **DEPRECATED**: Use `[global.matrix_rtc].foci` instead.
|
|
||||||
///
|
|
||||||
/// A list of MatrixRTC foci URLs which will be served as part of the
|
/// A list of MatrixRTC foci URLs which will be served as part of the
|
||||||
/// MSC4143 client endpoint at /.well-known/matrix/client.
|
/// MSC4143 client endpoint at /.well-known/matrix/client. If you're
|
||||||
|
/// setting up livekit, you'd want something like:
|
||||||
|
/// rtc_focus_server_urls = [
|
||||||
|
/// { type = "livekit", livekit_service_url = "https://livekit.example.com" },
|
||||||
|
/// ]
|
||||||
///
|
///
|
||||||
/// This option is deprecated and will be removed in a future release.
|
/// To disable, set this to be an empty vector (`[]`).
|
||||||
/// Please migrate to the new `[global.matrix_rtc]` config section.
|
|
||||||
///
|
///
|
||||||
/// default: []
|
/// default: []
|
||||||
#[serde(default)]
|
#[serde(default = "default_rtc_focus_urls")]
|
||||||
pub rtc_focus_server_urls: Vec<RtcFocusInfo>,
|
pub rtc_focus_server_urls: Vec<RtcFocusInfo>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2189,43 +2184,6 @@ pub struct BlurhashConfig {
|
|||||||
pub blurhash_max_raw_size: u64,
|
pub blurhash_max_raw_size: u64,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Deserialize, Default)]
|
|
||||||
#[config_example_generator(filename = "conduwuit-example.toml", section = "global.matrix_rtc")]
|
|
||||||
pub struct MatrixRtcConfig {
|
|
||||||
/// A list of MatrixRTC foci (transports) which will be served via the
|
|
||||||
/// MSC4143 RTC transports endpoint at
|
|
||||||
/// `/_matrix/client/v1/rtc/transports`. If you're setting up livekit,
|
|
||||||
/// you'd want something like:
|
|
||||||
/// ```toml
|
|
||||||
/// [global.matrix_rtc]
|
|
||||||
/// foci = [
|
|
||||||
/// { type = "livekit", livekit_service_url = "https://livekit.example.com" },
|
|
||||||
/// ]
|
|
||||||
/// ```
|
|
||||||
///
|
|
||||||
/// To disable, set this to an empty list (`[]`).
|
|
||||||
///
|
|
||||||
/// default: []
|
|
||||||
#[serde(default)]
|
|
||||||
pub foci: Vec<RtcFocusInfo>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl MatrixRtcConfig {
|
|
||||||
/// Returns the effective foci, falling back to the deprecated
|
|
||||||
/// `rtc_focus_server_urls` if the new config is empty.
|
|
||||||
#[must_use]
|
|
||||||
pub fn effective_foci<'a>(
|
|
||||||
&'a self,
|
|
||||||
deprecated_foci: &'a [RtcFocusInfo],
|
|
||||||
) -> &'a [RtcFocusInfo] {
|
|
||||||
if !self.foci.is_empty() {
|
|
||||||
&self.foci
|
|
||||||
} else {
|
|
||||||
deprecated_foci
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, Default, Deserialize)]
|
#[derive(Clone, Debug, Default, Deserialize)]
|
||||||
#[config_example_generator(filename = "conduwuit-example.toml", section = "global.ldap")]
|
#[config_example_generator(filename = "conduwuit-example.toml", section = "global.ldap")]
|
||||||
pub struct LdapConfig {
|
pub struct LdapConfig {
|
||||||
@@ -2419,7 +2377,6 @@ const DEPRECATED_KEYS: &[&str] = &[
|
|||||||
"well_known_support_email",
|
"well_known_support_email",
|
||||||
"well_known_support_mxid",
|
"well_known_support_mxid",
|
||||||
"registration_token_file",
|
"registration_token_file",
|
||||||
"well_known.rtc_focus_server_urls",
|
|
||||||
];
|
];
|
||||||
|
|
||||||
impl Config {
|
impl Config {
|
||||||
@@ -2703,6 +2660,9 @@ fn default_rocksdb_stats_level() -> u8 { 1 }
|
|||||||
#[inline]
|
#[inline]
|
||||||
pub fn default_default_room_version() -> RoomVersionId { RoomVersionId::V11 }
|
pub fn default_default_room_version() -> RoomVersionId { RoomVersionId::V11 }
|
||||||
|
|
||||||
|
#[must_use]
|
||||||
|
pub fn default_rtc_focus_urls() -> Vec<RtcFocusInfo> { vec![] }
|
||||||
|
|
||||||
fn default_ip_range_denylist() -> Vec<String> {
|
fn default_ip_range_denylist() -> Vec<String> {
|
||||||
vec![
|
vec![
|
||||||
"127.0.0.0/8".to_owned(),
|
"127.0.0.0/8".to_owned(),
|
||||||
|
|||||||
Reference in new issue
Block a user