mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-09-11 22:44:29 +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 {
|
||||
pub fn new(base_url: &str) -> Self {
|
||||
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,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue