add support for modifying the default notification pusher path
this is not officially in spec yet, but who cares? matrix team certainly doesn't care. Signed-off-by: girlbossceo <june@girlboss.ceo>
This commit is contained in:
parent
b8acacfb3e
commit
8b95399387
2 changed files with 12 additions and 1 deletions
|
@ -92,6 +92,9 @@ pub struct Config {
|
|||
|
||||
pub emergency_password: Option<String>,
|
||||
|
||||
#[serde(default = "default_notification_push_path")]
|
||||
pub notification_push_path: String,
|
||||
|
||||
#[serde(default = "false_fn")]
|
||||
pub allow_local_presence: bool,
|
||||
#[serde(default = "false_fn")]
|
||||
|
@ -187,6 +190,10 @@ impl fmt::Display for Config {
|
|||
"Allow device name federation",
|
||||
&self.allow_device_name_federation.to_string(),
|
||||
),
|
||||
(
|
||||
"Notification push path",
|
||||
&self.notification_push_path.to_string(),
|
||||
),
|
||||
("Allow room creation", &self.allow_room_creation.to_string()),
|
||||
(
|
||||
"Allow public room directory over federation",
|
||||
|
@ -317,6 +324,10 @@ fn default_log() -> String {
|
|||
"warn,state_res=warn,_=off,sled=off".to_owned()
|
||||
}
|
||||
|
||||
fn default_notification_push_path() -> String {
|
||||
"/_matrix/push/v1/notify".to_owned()
|
||||
}
|
||||
|
||||
fn default_turn_ttl() -> u64 {
|
||||
60 * 60 * 24
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ impl Service {
|
|||
where
|
||||
T: Debug,
|
||||
{
|
||||
let destination = destination.replace("/_matrix/push/v1/notify", "");
|
||||
let destination = destination.replace(services().globals.notification_push_path(), "");
|
||||
|
||||
let http_request = request
|
||||
.try_into_http_request::<BytesMut>(
|
||||
|
|
Loading…
Add table
Reference in a new issue