feat(webhooks): init, add service/models, add JSON to patch objects

This commit is contained in:
spiral 2021-11-02 06:08:17 -04:00
parent 08c5b78cc2
commit 71aec0d419
No known key found for this signature in database
GPG key ID: A6059F0CA0E1BD31
14 changed files with 551 additions and 2 deletions

View file

@ -38,5 +38,18 @@ namespace PluralKit.Core
return patch;
}
public JObject ToJson()
{
var o = new JObject();
if (DisplayName.IsPresent)
o.Add("display_name", DisplayName.Value);
if (AvatarUrl.IsPresent)
o.Add("avatar_url", AvatarUrl.Value);
return o;
}
}
}