[backend/api] Improve emoji alias update algorithm
This commit is contained in:
parent
a143ac8b50
commit
ca786026c2
1 changed files with 1 additions and 4 deletions
|
@ -239,10 +239,7 @@ public partial class EmojiService(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aliases != null)
|
if (aliases != null)
|
||||||
{
|
emoji.Aliases = aliases.Select(p => p.Trim()).Where(p => !string.IsNullOrWhiteSpace(p)).ToList();
|
||||||
aliases.RemoveAll(string.IsNullOrWhiteSpace);
|
|
||||||
emoji.Aliases = aliases;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If category is provided but empty reset to null
|
// If category is provided but empty reset to null
|
||||||
if (category != null) emoji.Category = string.IsNullOrEmpty(category) ? null : category;
|
if (category != null) emoji.Category = string.IsNullOrEmpty(category) ? null : category;
|
||||||
|
|
Loading…
Add table
Reference in a new issue