mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
fix(bot): fix import/export with incorrect webhook_avatar_url
Incorrect use of `member.WebhookAvatarFor` in member JSON creation
meant that exports of members without a webhook avatar set had the
normal avatar URL present in both fields.
This also adds a check to the importer to ignore the value of the
webhook_avatar_url field if it is the same as the avatar_url field.
Fixes: ccb89f50e9 (feat(bot): allow separate member avatars for proxied messages)
Co-authored-by: spiral <spiral@spiral.sh>
This commit is contained in:
parent
399cfdb19f
commit
2bffee5450
2 changed files with 11 additions and 2 deletions
|
|
@ -132,7 +132,7 @@ public static class PKMemberExt
|
|||
o.Add("birthday", member.BirthdayFor(ctx)?.FormatExport());
|
||||
o.Add("pronouns", member.PronounsFor(ctx));
|
||||
o.Add("avatar_url", member.AvatarFor(ctx).TryGetCleanCdnUrl());
|
||||
o.Add("webhook_avatar_url", member.WebhookAvatarFor(ctx).TryGetCleanCdnUrl());
|
||||
o.Add("webhook_avatar_url", member.AvatarPrivacy.Get(ctx, member.WebhookAvatarUrl?.TryGetCleanCdnUrl()));
|
||||
o.Add("banner", member.DescriptionPrivacy.Get(ctx, member.BannerImage).TryGetCleanCdnUrl());
|
||||
o.Add("description", member.DescriptionFor(ctx));
|
||||
o.Add("created", member.CreatedFor(ctx)?.FormatExport());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue