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 allows for using one avatar for the member card, and a different
avatar for proxied messages - so that users can set the main avatar to
a "full" version of their avatar, and the "proxy" avatar to a cropped
version.
- add PatchObject.CheckIsValid
- use transaction when creating member, as to not create a member if the
patch is invalid
- return edited system in `PATCH /s` endpoint