]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix avatar update
authorChocobozzz <me@florianbigard.com>
Mon, 17 Feb 2020 14:33:42 +0000 (15:33 +0100)
committerChocobozzz <me@florianbigard.com>
Mon, 17 Feb 2020 14:33:42 +0000 (15:33 +0100)
server/lib/activitypub/actor.ts

index f802658cfe9d3b6c3509427964940f8c0b365deb..0b21de0ca3f4a10970239f5485e53a4e76fd60af 100644 (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 })