diff options
author | Chocobozzz <me@florianbigard.com> | 2018-11-19 14:34:01 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-11-19 14:34:36 +0100 |
commit | 361805c48b14c5402c9984485c67c45a1a3113cc (patch) | |
tree | 8c2cc7260d17047b5bb017f1b01b19f6ec763402 /server/helpers/activitypub.ts | |
parent | a8a63227781c6815532cb7a68699b08fdb0368be (diff) | |
download | PeerTube-361805c48b14c5402c9984485c67c45a1a3113cc.tar.gz PeerTube-361805c48b14c5402c9984485c67c45a1a3113cc.tar.zst PeerTube-361805c48b14c5402c9984485c67c45a1a3113cc.zip |
Fix checkbox margins
Diffstat (limited to 'server/helpers/activitypub.ts')
-rw-r--r-- | server/helpers/activitypub.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/helpers/activitypub.ts b/server/helpers/activitypub.ts index bcbd9be59..79b76fa0b 100644 --- a/server/helpers/activitypub.ts +++ b/server/helpers/activitypub.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import * as Bluebird from 'bluebird' | 1 | import * as Bluebird from 'bluebird' |
2 | import * as validator from 'validator' | 2 | import * as validator from 'validator' |
3 | import { ResultList } from '../../shared/models' | 3 | import { ResultList } from '../../shared/models' |
4 | import { Activity, ActivityPubActor } from '../../shared/models/activitypub' | 4 | import { Activity } from '../../shared/models/activitypub' |
5 | import { ACTIVITY_PUB } from '../initializers' | 5 | import { ACTIVITY_PUB } from '../initializers' |
6 | import { ActorModel } from '../models/activitypub/actor' | 6 | import { ActorModel } from '../models/activitypub/actor' |
7 | import { signJsonLDObject } from './peertube-crypto' | 7 | import { signJsonLDObject } from './peertube-crypto' |
@@ -106,10 +106,10 @@ function buildSignedActivity (byActor: ActorModel, data: Object) { | |||
106 | return signJsonLDObject(byActor, activity) as Promise<Activity> | 106 | return signJsonLDObject(byActor, activity) as Promise<Activity> |
107 | } | 107 | } |
108 | 108 | ||
109 | function getActorUrl (activityActor: string | ActivityPubActor) { | 109 | function getAPUrl (activity: string | { id: string }) { |
110 | if (typeof activityActor === 'string') return activityActor | 110 | if (typeof activity === 'string') return activity |
111 | 111 | ||
112 | return activityActor.id | 112 | return activity.id |
113 | } | 113 | } |
114 | 114 | ||
115 | function checkUrlsSameHost (url1: string, url2: string) { | 115 | function checkUrlsSameHost (url1: string, url2: string) { |
@@ -123,7 +123,7 @@ function checkUrlsSameHost (url1: string, url2: string) { | |||
123 | 123 | ||
124 | export { | 124 | export { |
125 | checkUrlsSameHost, | 125 | checkUrlsSameHost, |
126 | getActorUrl, | 126 | getAPUrl, |
127 | activityPubContextify, | 127 | activityPubContextify, |
128 | activityPubCollectionPagination, | 128 | activityPubCollectionPagination, |
129 | buildSignedActivity | 129 | buildSignedActivity |