From 0f64086c75aa1dad3132a7ea22c48fefe7699930 Mon Sep 17 00:00:00 2001 From: Ske Date: Tue, 5 May 2020 16:14:21 +0200 Subject: [PATCH] Properly save avatar_url in the API --- PluralKit.API/Utils/JsonModelExt.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/PluralKit.API/Utils/JsonModelExt.cs b/PluralKit.API/Utils/JsonModelExt.cs index af4d62f6..1ba2fd15 100644 --- a/PluralKit.API/Utils/JsonModelExt.cs +++ b/PluralKit.API/Utils/JsonModelExt.cs @@ -79,6 +79,7 @@ namespace PluralKit.API if (o.ContainsKey("name")) member.Name = o.Value("name").BoundsCheckField(Limits.MaxMemberNameLength, "Member name"); if (o.ContainsKey("color")) member.Color = o.Value("color").NullIfEmpty()?.ToLower(); if (o.ContainsKey("display_name")) member.DisplayName = o.Value("display_name").NullIfEmpty().BoundsCheckField(Limits.MaxMemberNameLength, "Member display name"); + if (o.ContainsKey("avatar_url")) member.AvatarUrl = o.Value("avatar_url").NullIfEmpty().BoundsCheckField(Limits.MaxUriLength, "Member avatar URL"); if (o.ContainsKey("birthday")) { var str = o.Value("birthday").NullIfEmpty();