projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d233f1
)
Fix avatar update
author
Chocobozzz
<me@florianbigard.com>
Mon, 17 Feb 2020 14:33:42 +0000
(15:33 +0100)
committer
Chocobozzz
<me@florianbigard.com>
Mon, 17 Feb 2020 14:33:42 +0000
(15:33 +0100)
server/lib/activitypub/actor.ts
patch
|
blob
|
history
diff --git
a/server/lib/activitypub/actor.ts
b/server/lib/activitypub/actor.ts
index f802658cfe9d3b6c3509427964940f8c0b365deb..0b21de0ca3f4a10970239f5485e53a4e76fd60af 100644
(file)
--- 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 file
name
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 })