mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-09-12 06:54:34 +08:00
JMAP WS: Fix panic when not using https
This commit is contained in:
parent
a3bb88fd0f
commit
868b4749d2
1 changed files with 4 additions and 1 deletions
|
@ -308,7 +308,10 @@ impl Default for SieveSessionCapabilities {
|
||||||
impl WebSocketCapabilities {
|
impl WebSocketCapabilities {
|
||||||
pub fn new(base_url: &str) -> Self {
|
pub fn new(base_url: &str) -> Self {
|
||||||
WebSocketCapabilities {
|
WebSocketCapabilities {
|
||||||
url: format!("ws{}/jmap/ws", base_url.strip_prefix("http").unwrap()),
|
url: format!(
|
||||||
|
"ws{}/jmap/ws",
|
||||||
|
base_url.strip_prefix("http").unwrap_or_default()
|
||||||
|
),
|
||||||
supports_push: true,
|
supports_push: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue