Fix avatar update

pull/2712/head
Chocobozzz 2020-02-17 15:33:42 +01:00
parent 7d233f1dd9
commit 1c5fbed209
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 2 additions and 2 deletions

View File

@ -176,8 +176,8 @@ async function updateActorAvatarInstance (actor: MActorDefault, info: AvatarInfo
if (!info.name) return actor
if (actor.Avatar) {
// Don't update the avatar if the filename did not change
if (actor.Avatar.fileUrl === info.fileUrl) return actor
// Don't update the avatar if the file URL did not change
if (info.fileUrl && actor.Avatar.fileUrl === info.fileUrl) return actor
try {
await actor.Avatar.destroy({ transaction: t })