Added more handling when fromName is null or empty (#399)

This commit is contained in:
Tiktack
2024-09-27 01:06:57 +02:00
committed by GitHub
parent 939b395dcd
commit 9aa1de11af
4 changed files with 25 additions and 11 deletions

View File

@@ -36,7 +36,7 @@ namespace Wino.Core.Domain.Entities
/// </summary>
public bool IsRootContact { get; set; }
public string DisplayName => Address == Name ? Address : $"{Name} <{Address}>";
public string DisplayName => Address == Name || string.IsNullOrWhiteSpace(Name) ? Address.ToLowerInvariant() : $"{Name} <{Address.ToLowerInvariant()}>";
public override bool Equals(object obj)
{