aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/activitypub.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/activitypub.ts')
-rw-r--r--server/middlewares/activitypub.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/middlewares/activitypub.ts b/server/middlewares/activitypub.ts
index c2ad18195..489396447 100644
--- a/server/middlewares/activitypub.ts
+++ b/server/middlewares/activitypub.ts
@@ -2,16 +2,16 @@ import { eachSeries } from 'async'
2import { NextFunction, Request, RequestHandler, Response } from 'express' 2import { NextFunction, Request, RequestHandler, Response } from 'express'
3import { ActivityPubSignature } from '../../shared' 3import { ActivityPubSignature } from '../../shared'
4import { isSignatureVerified, logger } from '../helpers' 4import { isSignatureVerified, logger } from '../helpers'
5import { database as db } from '../initializers' 5import { ACCEPT_HEADERS, ACTIVITY_PUB } from '../initializers'
6import { ACCEPT_HEADERS, ACTIVITY_PUB } from '../initializers/constants' 6import { fetchRemoteAccount, saveAccountAndServerIfNotExist } from '../lib/activitypub'
7import { fetchRemoteAccount, saveAccountAndServerIfNotExist } from '../lib/activitypub/account' 7import { AccountModel } from '../models/account/account'
8 8
9async function checkSignature (req: Request, res: Response, next: NextFunction) { 9async function checkSignature (req: Request, res: Response, next: NextFunction) {
10 const signatureObject: ActivityPubSignature = req.body.signature 10 const signatureObject: ActivityPubSignature = req.body.signature
11 11
12 logger.debug('Checking signature of account %s...', signatureObject.creator) 12 logger.debug('Checking signature of account %s...', signatureObject.creator)
13 13
14 let account = await db.Account.loadByUrl(signatureObject.creator) 14 let account = await AccountModel.loadByUrl(signatureObject.creator)
15 15
16 // We don't have this account in our database, fetch it on remote 16 // We don't have this account in our database, fetch it on remote
17 if (!account) { 17 if (!account) {