Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for establishing Send url in cloud vs on-prem #1311

Merged
merged 1 commit into from
Mar 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/App/Utilities/AppHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public static async Task CopySendUrlAsync(SendView send)
return;
}
var platformUtilsService = ServiceContainer.Resolve<IPlatformUtilsService>("platformUtilsService");
await platformUtilsService.CopyToClipboardAsync(AppHelpers.GetSendUrl(send));
await platformUtilsService.CopyToClipboardAsync(GetSendUrl(send));
platformUtilsService.ShowToast("info", null,
string.Format(AppResources.ValueHasBeenCopied, AppResources.SendLink));
}
Expand All @@ -204,7 +204,12 @@ await Share.RequestAsync(new ShareTextRequest
private static string GetSendUrl(SendView send)
{
var environmentService = ServiceContainer.Resolve<IEnvironmentService>("environmentService");
return environmentService.BaseUrl + "/#/send/" + send.AccessId + "/" + send.UrlB64Key;
var webVaultUrl = environmentService.GetWebVaultUrl();
if (webVaultUrl != null)
{
return webVaultUrl + "/#/send/" + send.AccessId + "/" + send.UrlB64Key;
}
return "https://send.bitwarden.com/#" + send.AccessId + "/" + send.UrlB64Key;
}

public static async Task<bool> RemoveSendPasswordAsync(string sendId)
Expand Down