Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix avatar update

Chocobozzz1c5fbed2093c
diff --git a/server/lib/activitypub/actor.ts b/server/lib/activitypub/actor.ts
index f802658cfe..0b21de0ca3 100644
--- a/server/lib/activitypub/actor.ts
+++ b/server/lib/activitypub/actor.ts
@@ -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 })