aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue/handlers/utils
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2018-07-25 22:01:25 +0200
committerRigel Kent <sendmemail@rigelk.eu>2018-07-25 22:01:25 +0200
commitc1e791bad0b079af67398f6407221e6dcbb573dd (patch)
tree82e5944b4458dd35aa482a38f6b650eb93bb89ad /server/lib/job-queue/handlers/utils
parent5f7021c33d31c5255b995ae0ff86b5bbea4ea4b9 (diff)
downloadPeerTube-c1e791bad0b079af67398f6407221e6dcbb573dd.tar.gz
PeerTube-c1e791bad0b079af67398f6407221e6dcbb573dd.tar.zst
PeerTube-c1e791bad0b079af67398f6407221e6dcbb573dd.zip
expliciting type checks and predicates (server only)
Diffstat (limited to 'server/lib/job-queue/handlers/utils')
-rw-r--r--server/lib/job-queue/handlers/utils/activitypub-http-utils.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/lib/job-queue/handlers/utils/activitypub-http-utils.ts b/server/lib/job-queue/handlers/utils/activitypub-http-utils.ts
index c087371c6..36092665e 100644
--- a/server/lib/job-queue/handlers/utils/activitypub-http-utils.ts
+++ b/server/lib/job-queue/handlers/utils/activitypub-http-utils.ts
@@ -15,7 +15,7 @@ async function computeBody (payload: { body: any, signatureActorId?: number }) {
15} 15}
16 16
17async function buildSignedRequestOptions (payload: { signatureActorId?: number }) { 17async function buildSignedRequestOptions (payload: { signatureActorId?: number }) {
18 let actor: ActorModel 18 let actor: ActorModel | null
19 if (payload.signatureActorId) { 19 if (payload.signatureActorId) {
20 actor = await ActorModel.load(payload.signatureActorId) 20 actor = await ActorModel.load(payload.signatureActorId)
21 if (!actor) throw new Error('Unknown signature actor id.') 21 if (!actor) throw new Error('Unknown signature actor id.')