aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2023-07-18 03:39:59 -0400
committerJesse Luehrs <doy@tozt.net>2023-07-18 03:41:17 -0400
commitd2a97be689b034ed056f3ba41a9775635872a073 (patch)
treeb3b7cdba70d065f78465690b9e6e014f7c085e5f /src/bin
parentcf75da99817cadba82299ef3d106da5308433486 (diff)
downloadrbw-d2a97be689b034ed056f3ba41a9775635872a073.tar.gz
rbw-d2a97be689b034ed056f3ba41a9775635872a073.zip
fix websockets for self-hosted bitwarden
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/rbw-agent/actions.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/bin/rbw-agent/actions.rs b/src/bin/rbw-agent/actions.rs
index c44f601..6291680 100644
--- a/src/bin/rbw-agent/actions.rs
+++ b/src/bin/rbw-agent/actions.rs
@@ -697,13 +697,12 @@ pub async fn subscribe_to_notifications(
let access_token =
db.access_token.context("Error getting access token")?;
- let mut websocket_url = config
- .base_url
- .clone()
- .expect("config is missing base url")
- .replace("https://", "wss://")
- + "/notifications/hub?access_token=";
- websocket_url.push_str(&access_token);
+ let websocket_url = format!(
+ "{}/hub?access_token={}",
+ config.notifications_url(),
+ access_token
+ )
+ .replace("https://", "wss://");
let mut state = state.lock().await;
let err = state