mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
feat: add support for MSC4439 PGP key URIs in wk-support
This commit introduces support for MSC4439, Encryption Key URIs in `.well-known/matrix/support`. ([MSC](https://github.com/matrix-org/matrix-spec-proposals/pull/4439), [Rendered](https://github.com/thetayloredman/matrix-spec-proposals/blob/msc4439/proposals/4439-support-contact-encryption.md)) via an additional config option.
This commit is contained in:
@@ -71,6 +71,7 @@ pub(crate) async fn well_known_support(
|
||||
|
||||
let email_address = services.config.well_known.support_email.clone();
|
||||
let matrix_id = services.config.well_known.support_mxid.clone();
|
||||
let pgp_key = services.config.well_known.support_pgp_key.clone();
|
||||
|
||||
// TODO: support defining multiple contacts in the config
|
||||
let mut contacts: Vec<Contact> = vec![];
|
||||
@@ -88,6 +89,7 @@ pub(crate) async fn well_known_support(
|
||||
role: role_value.clone(),
|
||||
email_address: email_address.clone(),
|
||||
matrix_id: matrix_id.clone(),
|
||||
pgp_key: pgp_key.clone(),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -104,6 +106,7 @@ pub(crate) async fn well_known_support(
|
||||
role: role_value.clone(),
|
||||
email_address: None,
|
||||
matrix_id: Some(user_id.to_owned()),
|
||||
pgp_key: None,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2191,6 +2191,13 @@ pub struct WellKnownConfig {
|
||||
/// listed.
|
||||
pub support_mxid: Option<OwnedUserId>,
|
||||
|
||||
/// PGP key URI for server support contacts, to be served as part of the
|
||||
/// MSC1929 server support endpoint. This uses the unstable prefix from
|
||||
/// [MSC4439].
|
||||
///
|
||||
/// [MSC4439]: https://github.com/matrix-org/matrix-spec-proposals/pull/4439
|
||||
pub support_pgp_key: Option<String>,
|
||||
|
||||
/// **DEPRECATED**: Use `[global.matrix_rtc].foci` instead.
|
||||
///
|
||||
/// A list of MatrixRTC foci URLs which will be served as part of the
|
||||
|
||||
Reference in New Issue
Block a user