Compare commits
7 commits
61114fe775
...
be924ba9c1
Author | SHA1 | Date | |
---|---|---|---|
be924ba9c1 | |||
911525933b | |||
b061594556 | |||
a8d9b5536e | |||
d03ec7036d | |||
3644ce33b3 | |||
a47ba6c289 |
1 changed files with 8 additions and 6 deletions
|
@ -470,9 +470,11 @@ mod server {
|
|||
let http_port = server_config.http()?.port();
|
||||
let webhook_url = server_config.inbound_webhook().base_url();
|
||||
let storage_path = server_config.storage().path();
|
||||
let notification_webhook_url = server_config
|
||||
.notification()
|
||||
.webhook_url()
|
||||
let notification = &server_config.notification();
|
||||
let notification_webhook_url = notification.webhook_url().unwrap_or_default();
|
||||
let notification_webhook_secret = notification
|
||||
.webhook_secret()
|
||||
.map(|secret| secret.expose_secret().clone())
|
||||
.unwrap_or_default();
|
||||
let forge_alias = server_config
|
||||
.forges()
|
||||
|
@ -523,9 +525,9 @@ url = "{webhook_url}"
|
|||
[storage]
|
||||
path = {storage_path:?}
|
||||
|
||||
[notifications]
|
||||
[notification]
|
||||
type = "Webhook"
|
||||
webhook = {{ url = "{notification_webhook_url}" }}
|
||||
webhook = {{ url = "{notification_webhook_url}", secret = "{notification_webhook_secret}" }}
|
||||
|
||||
[forge.{forge_alias}]
|
||||
forge_type = "{forge_type}"
|
||||
|
@ -745,7 +747,7 @@ mod given {
|
|||
InboundWebhook::new(a_name())
|
||||
}
|
||||
pub fn an_outbound_webhook() -> OutboundWebhook {
|
||||
OutboundWebhook::new(a_name())
|
||||
OutboundWebhook::new(a_name(), a_name())
|
||||
}
|
||||
pub fn a_server_storage() -> ServerStorage {
|
||||
ServerStorage::new(a_name().into())
|
||||
|
|
Loading…
Reference in a new issue