mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-25 15:35:12 +00:00
Fix #2920
This commit is contained in:
parent
9703d613cf
commit
46d3293edd
1 changed files with 13 additions and 11 deletions
|
@ -26,6 +26,7 @@ export async function createImage(actor: IRemoteUser, value: any): Promise<IDriv
|
|||
|
||||
let file = await uploadFromUrl(image.url, actor, null, image.url, image.sensitive);
|
||||
|
||||
if (file.metadata.isRemote) {
|
||||
// URLが異なっている場合、同じ画像が以前に異なるURLで登録されていたということなので、
|
||||
// URLを更新する
|
||||
if (file.metadata.url !== image.url) {
|
||||
|
@ -38,6 +39,7 @@ export async function createImage(actor: IRemoteUser, value: any): Promise<IDriv
|
|||
returnNewDocument: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return file;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue