perf(server): use cached user info in getUserFromApId
This commit is contained in:
parent
8cbfc047bb
commit
17589843da
5 changed files with 38 additions and 13 deletions
|
|
@ -4,11 +4,11 @@ import renderAccept from '@/remote/activitypub/renderer/accept.js';
|
|||
import { deliver } from '@/queue/index.js';
|
||||
import { publishMainStream } from '@/services/stream.js';
|
||||
import { insertFollowingDoc } from '../create.js';
|
||||
import { User, ILocalUser } from '@/models/entities/user.js';
|
||||
import { User, ILocalUser, CacheableUser } from '@/models/entities/user.js';
|
||||
import { FollowRequests, Users } from '@/models/index.js';
|
||||
import { IdentifiableError } from '@/misc/identifiable-error.js';
|
||||
|
||||
export default async function(followee: { id: User['id']; host: User['host']; uri: User['host']; inbox: User['inbox']; sharedInbox: User['sharedInbox']; }, follower: User) {
|
||||
export default async function(followee: { id: User['id']; host: User['host']; uri: User['host']; inbox: User['inbox']; sharedInbox: User['sharedInbox']; }, follower: CacheableUser) {
|
||||
const request = await FollowRequests.findOneBy({
|
||||
followeeId: followee.id,
|
||||
followerId: follower.id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue