mirror of
https://github.com/bitwarden/mobile
synced 2025-12-20 10:13:42 +00:00
[PM-4800] Send item domain name to fastmail (#2867)
* Send item domain name to fastmail - Added a metadata field (forDomain:) to the Fastmail Forwarder API request that's set to the domain name of the item being added to the vault, or to "" if the username generator is being used in standalone mode. This allows the user's Fastmail account to display the domain name for the username that was generated. * Minor changes for readability * dotnet format --------- Co-authored-by: ✨ Audrey ✨ <ajensen@bitwarden.com>
This commit is contained in:
@@ -148,6 +148,13 @@ namespace Bit.Core.Services
|
||||
.GenerateAsync(_apiService, forwardedEmailOptions);
|
||||
}
|
||||
|
||||
if (options.ServiceType == ForwardedEmailServiceType.Fastmail)
|
||||
{
|
||||
var fastmailEmailOptions = (FastmailForwarderOptions)options.GetForwarderOptions();
|
||||
return await new FastmailForwarder()
|
||||
.GenerateAsync(_apiService, fastmailEmailOptions);
|
||||
}
|
||||
|
||||
BaseForwarder<ForwarderOptions> simpleForwarder = null;
|
||||
|
||||
switch (options.ServiceType)
|
||||
@@ -161,9 +168,6 @@ namespace Bit.Core.Services
|
||||
case ForwardedEmailServiceType.DuckDuckGo:
|
||||
simpleForwarder = new DuckDuckGoForwarder();
|
||||
break;
|
||||
case ForwardedEmailServiceType.Fastmail:
|
||||
simpleForwarder = new FastmailForwarder();
|
||||
break;
|
||||
default:
|
||||
_logger.Value.Error($"Error UsernameGenerationService: ForwardedEmailServiceType {options.ServiceType} not implemented.");
|
||||
return Constants.DefaultUsernameGenerated;
|
||||
|
||||
Reference in New Issue
Block a user