From 1c67c26bd87aae64fe0f2ef45140e12a78564699 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 26 Mar 2022 15:34:00 +0900 Subject: refactor: migrate to typeorm 3.0 (#8443) * wip * wip * wip * Update following.ts * wip * wip * wip * Update resolve-user.ts * maxQueryExecutionTime * wip * wip --- packages/backend/src/remote/activitypub/kernel/block/index.ts | 2 +- packages/backend/src/remote/activitypub/kernel/delete/actor.ts | 2 +- packages/backend/src/remote/activitypub/kernel/flag/index.ts | 2 +- packages/backend/src/remote/activitypub/kernel/read.ts | 2 +- packages/backend/src/remote/activitypub/kernel/undo/accept.ts | 2 +- packages/backend/src/remote/activitypub/kernel/undo/announce.ts | 2 +- packages/backend/src/remote/activitypub/kernel/undo/block.ts | 2 +- packages/backend/src/remote/activitypub/kernel/undo/follow.ts | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) (limited to 'packages/backend/src/remote/activitypub/kernel') diff --git a/packages/backend/src/remote/activitypub/kernel/block/index.ts b/packages/backend/src/remote/activitypub/kernel/block/index.ts index 69037fec17..23cee81d5b 100644 --- a/packages/backend/src/remote/activitypub/kernel/block/index.ts +++ b/packages/backend/src/remote/activitypub/kernel/block/index.ts @@ -18,6 +18,6 @@ export default async (actor: CacheableRemoteUser, activity: IBlock): Promise uri.startsWith(config.url + '/users/')).map(uri => uri.split('/').pop()!); - const users = await Users.find({ + const users = await Users.findBy({ id: In(userIds), }); if (users.length < 1) return `skip`; diff --git a/packages/backend/src/remote/activitypub/kernel/read.ts b/packages/backend/src/remote/activitypub/kernel/read.ts index 333466e22f..7f1519ac2e 100644 --- a/packages/backend/src/remote/activitypub/kernel/read.ts +++ b/packages/backend/src/remote/activitypub/kernel/read.ts @@ -13,7 +13,7 @@ export const performReadActivity = async (actor: CacheableRemoteUser, activity: const messageId = id.split('/').pop(); - const message = await MessagingMessages.findOne(messageId); + const message = await MessagingMessages.findOneBy({ id: messageId }); if (message == null) { return `skip: message not found`; } diff --git a/packages/backend/src/remote/activitypub/kernel/undo/accept.ts b/packages/backend/src/remote/activitypub/kernel/undo/accept.ts index e2f77ca792..8f6eab6858 100644 --- a/packages/backend/src/remote/activitypub/kernel/undo/accept.ts +++ b/packages/backend/src/remote/activitypub/kernel/undo/accept.ts @@ -13,7 +13,7 @@ export default async (actor: CacheableRemoteUser, activity: IAccept): Promise => { const uri = getApId(activity); - const note = await Notes.findOne({ + const note = await Notes.findOneBy({ uri, }); diff --git a/packages/backend/src/remote/activitypub/kernel/undo/block.ts b/packages/backend/src/remote/activitypub/kernel/undo/block.ts index a4bb5e604f..4ac6698578 100644 --- a/packages/backend/src/remote/activitypub/kernel/undo/block.ts +++ b/packages/backend/src/remote/activitypub/kernel/undo/block.ts @@ -16,6 +16,6 @@ export default async (actor: CacheableRemoteUser, activity: IBlock): Promise