aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/activitypub/actor.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-21 14:31:57 +0200
committerChocobozzz <me@florianbigard.com>2019-08-21 15:23:04 +0200
commitb5fecbf44192144d1ca27c23a0b53922de288c10 (patch)
tree03e4f1048273e6de60b8eb642fb52b2a4c68e60c /server/models/activitypub/actor.ts
parentf92e7f76d43cbad173be87f47105b9a02032318a (diff)
downloadPeerTube-b5fecbf44192144d1ca27c23a0b53922de288c10.tar.gz
PeerTube-b5fecbf44192144d1ca27c23a0b53922de288c10.tar.zst
PeerTube-b5fecbf44192144d1ca27c23a0b53922de288c10.zip
Type toActivityPubObject functions
Diffstat (limited to 'server/models/activitypub/actor.ts')
-rw-r--r--server/models/activitypub/actor.ts13
1 files changed, 7 insertions, 6 deletions
diff --git a/server/models/activitypub/actor.ts b/server/models/activitypub/actor.ts
index e2213afa1..fb4327e4f 100644
--- a/server/models/activitypub/actor.ts
+++ b/server/models/activitypub/actor.ts
@@ -39,12 +39,13 @@ import { VideoModel } from '../video/video'
39import { 39import {
40 MActor, 40 MActor,
41 MActorAccountChannelId, 41 MActorAccountChannelId,
42 MActorAP,
42 MActorFormattable, 43 MActorFormattable,
43 MActorFull, MActorHost, 44 MActorFull,
45 MActorHost,
46 MActorRedundancyAllowedOpt,
44 MActorServer, 47 MActorServer,
45 MActorSummaryFormattable, 48 MActorSummaryFormattable
46 MServerHost,
47 MActorRedundancyAllowed
48} from '../../typings/models' 49} from '../../typings/models'
49import * as Bluebird from 'bluebird' 50import * as Bluebird from 'bluebird'
50 51
@@ -429,7 +430,7 @@ export class ActorModel extends Model<ActorModel> {
429 }) 430 })
430 } 431 }
431 432
432 toActivityPubObject (name: string, type: 'Account' | 'Application' | 'VideoChannel') { 433 toActivityPubObject (this: MActorAP, name: string, type: 'Account' | 'Application' | 'VideoChannel') {
433 let activityPubType 434 let activityPubType
434 if (type === 'Account') { 435 if (type === 'Account') {
435 activityPubType = 'Person' as 'Person' 436 activityPubType = 'Person' as 'Person'
@@ -528,7 +529,7 @@ export class ActorModel extends Model<ActorModel> {
528 return this.Server ? this.Server.host : WEBSERVER.HOST 529 return this.Server ? this.Server.host : WEBSERVER.HOST
529 } 530 }
530 531
531 getRedundancyAllowed (this: MActorRedundancyAllowed) { 532 getRedundancyAllowed () {
532 return this.Server ? this.Server.redundancyAllowed : false 533 return this.Server ? this.Server.redundancyAllowed : false
533 } 534 }
534 535