Skip to content

Commit ab47261

Browse files
committed
Fix attachment detection
1 parent f34467b commit ab47261

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/remote/activitypub/models/image.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export async function createImage(actor: IRemoteUser, value: IObject): Promise<I
2323
if (!isDocument(image)) return null;
2424

2525
if (typeof image.url !== 'string') {
26-
throw new Error('invalid image: url not privided');
26+
return null;
2727
}
2828

2929
logger.info(`Creating the Image: ${image.url}`);
@@ -68,7 +68,7 @@ export async function createImage(actor: IRemoteUser, value: IObject): Promise<I
6868
* Misskeyに対象のImageが登録されていればそれを返し、そうでなければ
6969
* リモートサーバーからフェッチしてMisskeyに登録しそれを返します。
7070
*/
71-
export async function resolveImage(actor: IRemoteUser, value: IObject): Promise<IDriveFile> {
71+
export async function resolveImage(actor: IRemoteUser, value: IObject): Promise<IDriveFile | null | undefined> {
7272
// TODO
7373

7474
// リモートサーバーからフェッチしてきて登録

0 commit comments

Comments
 (0)