mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-06 05:47:53 +00:00
fix(bot): ignore charset from discord cdn for export files
This commit is contained in:
parent
f58ada7fac
commit
f6a9d693cd
1 changed files with 3 additions and 0 deletions
|
|
@ -47,6 +47,9 @@ public class ImportExport
|
|||
var response = await _client.GetAsync(url);
|
||||
if (!response.IsSuccessStatusCode)
|
||||
throw Errors.InvalidImportFile;
|
||||
// hacky fix for discord api returning nonsense charsets sometimes
|
||||
response.Content.Headers.Remove("content-type");
|
||||
response.Content.Headers.Add("content-type", "application/json; charset=UTF-8");
|
||||
data = JsonConvert.DeserializeObject<JObject>(
|
||||
await response.Content.ReadAsStringAsync(),
|
||||
_settings
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue