aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-02-17 15:33:42 +0100
committerChocobozzz <me@florianbigard.com>2020-02-17 15:33:42 +0100
commit1c5fbed2093c0462e40a092d49d761a043c50e98 (patch)
treed06c4f600e77a3690065f293bceb18bde540b352 /server/lib/activitypub
parent7d233f1dd9c5be8d7beba7ec5b92029888e0c91c (diff)
downloadPeerTube-1c5fbed2093c0462e40a092d49d761a043c50e98.tar.gz
PeerTube-1c5fbed2093c0462e40a092d49d761a043c50e98.tar.zst
PeerTube-1c5fbed2093c0462e40a092d49d761a043c50e98.zip
Fix avatar update
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r--server/lib/activitypub/actor.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/activitypub/actor.ts b/server/lib/activitypub/actor.ts
index f802658cf..0b21de0ca 100644
--- a/server/lib/activitypub/actor.ts
+++ b/server/lib/activitypub/actor.ts
@@ -176,8 +176,8 @@ async function updateActorAvatarInstance (actor: MActorDefault, info: AvatarInfo
176 if (!info.name) return actor 176 if (!info.name) return actor
177 177
178 if (actor.Avatar) { 178 if (actor.Avatar) {
179 // Don't update the avatar if the filename did not change 179 // Don't update the avatar if the file URL did not change
180 if (actor.Avatar.fileUrl === info.fileUrl) return actor 180 if (info.fileUrl && actor.Avatar.fileUrl === info.fileUrl) return actor
181 181
182 try { 182 try {
183 await actor.Avatar.destroy({ transaction: t }) 183 await actor.Avatar.destroy({ transaction: t })