assistant: Handle http:// links in /fetch (#14243)
Previously http://google.com would get modified to https://http://google.com which doesn't work. I assume http links should be supported. Release Notes: - N/A
This commit is contained in:
@@ -27,7 +27,7 @@ pub(crate) struct FetchSlashCommand;
|
||||
impl FetchSlashCommand {
|
||||
async fn build_message(http_client: Arc<HttpClientWithUrl>, url: &str) -> Result<String> {
|
||||
let mut url = url.to_owned();
|
||||
if !url.starts_with("https://") {
|
||||
if !url.starts_with("https://") && !url.starts_with("http://") {
|
||||
url = format!("https://{url}");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user