mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-13 09:10:14 +00:00
properly encode custom emojis in emoji API routes
This commit is contained in:
parent
6455c5fc5f
commit
af801e2b01
1 changed files with 1 additions and 1 deletions
|
|
@ -129,7 +129,7 @@ namespace Myriad.Rest
|
||||||
_client.Post<Channel>($"/users/@me/channels", ("CreateDM", default), new CreateDmRequest(recipientId))!;
|
_client.Post<Channel>($"/users/@me/channels", ("CreateDM", default), new CreateDmRequest(recipientId))!;
|
||||||
|
|
||||||
private static string EncodeEmoji(Emoji emoji) =>
|
private static string EncodeEmoji(Emoji emoji) =>
|
||||||
WebUtility.UrlEncode(emoji.Name) ?? emoji.Id?.ToString() ??
|
WebUtility.UrlEncode(emoji.Id != null ? $"{emoji.Name}:{emoji.Id}" : emoji.Name) ??
|
||||||
throw new ArgumentException("Could not encode emoji");
|
throw new ArgumentException("Could not encode emoji");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue