diff options
author | Chocobozzz <me@florianbigard.com> | 2020-06-18 10:45:25 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-06-18 10:46:27 +0200 |
commit | 26d6bf6533023326fa017812cf31bbe20c752d36 (patch) | |
tree | 9c4e3ecdc344420190f17d429bdf05d78fae7a8c /server/lib/activitypub/process | |
parent | d6d951ddc0c492f3261065b5dcb4df0534d252fc (diff) | |
download | PeerTube-26d6bf6533023326fa017812cf31bbe20c752d36.tar.gz PeerTube-26d6bf6533023326fa017812cf31bbe20c752d36.tar.zst PeerTube-26d6bf6533023326fa017812cf31bbe20c752d36.zip |
Split types and typings
Diffstat (limited to 'server/lib/activitypub/process')
-rw-r--r-- | server/lib/activitypub/process/process-accept.ts | 4 | ||||
-rw-r--r-- | server/lib/activitypub/process/process-announce.ts | 4 | ||||
-rw-r--r-- | server/lib/activitypub/process/process-create.ts | 4 | ||||
-rw-r--r-- | server/lib/activitypub/process/process-delete.ts | 4 | ||||
-rw-r--r-- | server/lib/activitypub/process/process-dislike.ts | 4 | ||||
-rw-r--r-- | server/lib/activitypub/process/process-flag.ts | 4 | ||||
-rw-r--r-- | server/lib/activitypub/process/process-follow.ts | 4 | ||||
-rw-r--r-- | server/lib/activitypub/process/process-like.ts | 4 | ||||
-rw-r--r-- | server/lib/activitypub/process/process-reject.ts | 4 | ||||
-rw-r--r-- | server/lib/activitypub/process/process-undo.ts | 4 | ||||
-rw-r--r-- | server/lib/activitypub/process/process-update.ts | 4 | ||||
-rw-r--r-- | server/lib/activitypub/process/process-view.ts | 4 | ||||
-rw-r--r-- | server/lib/activitypub/process/process.ts | 4 |
13 files changed, 26 insertions, 26 deletions
diff --git a/server/lib/activitypub/process/process-accept.ts b/server/lib/activitypub/process/process-accept.ts index dcfbb2c84..1799829f8 100644 --- a/server/lib/activitypub/process/process-accept.ts +++ b/server/lib/activitypub/process/process-accept.ts | |||
@@ -1,8 +1,8 @@ | |||
1 | import { ActivityAccept } from '../../../../shared/models/activitypub' | 1 | import { ActivityAccept } from '../../../../shared/models/activitypub' |
2 | import { ActorFollowModel } from '../../../models/activitypub/actor-follow' | 2 | import { ActorFollowModel } from '../../../models/activitypub/actor-follow' |
3 | import { addFetchOutboxJob } from '../actor' | 3 | import { addFetchOutboxJob } from '../actor' |
4 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 4 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
5 | import { MActorDefault, MActorSignature } from '../../../typings/models' | 5 | import { MActorDefault, MActorSignature } from '../../../types/models' |
6 | 6 | ||
7 | async function processAcceptActivity (options: APProcessorOptions<ActivityAccept>) { | 7 | async function processAcceptActivity (options: APProcessorOptions<ActivityAccept>) { |
8 | const { byActor: targetActor, inboxActor } = options | 8 | const { byActor: targetActor, inboxActor } = options |
diff --git a/server/lib/activitypub/process/process-announce.ts b/server/lib/activitypub/process/process-announce.ts index 26427aaa1..63082466e 100644 --- a/server/lib/activitypub/process/process-announce.ts +++ b/server/lib/activitypub/process/process-announce.ts | |||
@@ -6,8 +6,8 @@ import { forwardVideoRelatedActivity } from '../send/utils' | |||
6 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' | 6 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' |
7 | import { Notifier } from '../../notifier' | 7 | import { Notifier } from '../../notifier' |
8 | import { logger } from '../../../helpers/logger' | 8 | import { logger } from '../../../helpers/logger' |
9 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 9 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
10 | import { MActorSignature, MVideoAccountLightBlacklistAllFiles } from '../../../typings/models' | 10 | import { MActorSignature, MVideoAccountLightBlacklistAllFiles } from '../../../types/models' |
11 | 11 | ||
12 | async function processAnnounceActivity (options: APProcessorOptions<ActivityAnnounce>) { | 12 | async function processAnnounceActivity (options: APProcessorOptions<ActivityAnnounce>) { |
13 | const { activity, byActor: actorAnnouncer } = options | 13 | const { activity, byActor: actorAnnouncer } = options |
diff --git a/server/lib/activitypub/process/process-create.ts b/server/lib/activitypub/process/process-create.ts index 5e737f49e..74f1032e2 100644 --- a/server/lib/activitypub/process/process-create.ts +++ b/server/lib/activitypub/process/process-create.ts | |||
@@ -5,8 +5,8 @@ import { VideoCommentObject } from '../../../../shared/models/activitypub/object | |||
5 | import { retryTransactionWrapper } from '../../../helpers/database-utils' | 5 | import { retryTransactionWrapper } from '../../../helpers/database-utils' |
6 | import { logger } from '../../../helpers/logger' | 6 | import { logger } from '../../../helpers/logger' |
7 | import { sequelizeTypescript } from '../../../initializers/database' | 7 | import { sequelizeTypescript } from '../../../initializers/database' |
8 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 8 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
9 | import { MActorSignature, MCommentOwnerVideo, MVideoAccountLightBlacklistAllFiles } from '../../../typings/models' | 9 | import { MActorSignature, MCommentOwnerVideo, MVideoAccountLightBlacklistAllFiles } from '../../../types/models' |
10 | import { Notifier } from '../../notifier' | 10 | import { Notifier } from '../../notifier' |
11 | import { createOrUpdateCacheFile } from '../cache-file' | 11 | import { createOrUpdateCacheFile } from '../cache-file' |
12 | import { createOrUpdateVideoPlaylist } from '../playlist' | 12 | import { createOrUpdateVideoPlaylist } from '../playlist' |
diff --git a/server/lib/activitypub/process/process-delete.ts b/server/lib/activitypub/process/process-delete.ts index 7c8dc83e8..b9fc5e792 100644 --- a/server/lib/activitypub/process/process-delete.ts +++ b/server/lib/activitypub/process/process-delete.ts | |||
@@ -8,8 +8,8 @@ import { VideoCommentModel } from '../../../models/video/video-comment' | |||
8 | import { markCommentAsDeleted } from '../../video-comment' | 8 | import { markCommentAsDeleted } from '../../video-comment' |
9 | import { forwardVideoRelatedActivity } from '../send/utils' | 9 | import { forwardVideoRelatedActivity } from '../send/utils' |
10 | import { VideoPlaylistModel } from '../../../models/video/video-playlist' | 10 | import { VideoPlaylistModel } from '../../../models/video/video-playlist' |
11 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 11 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
12 | import { MAccountActor, MActor, MActorSignature, MChannelActor, MChannelActorAccountActor } from '../../../typings/models' | 12 | import { MAccountActor, MActor, MActorSignature, MChannelActor, MChannelActorAccountActor } from '../../../types/models' |
13 | 13 | ||
14 | async function processDeleteActivity (options: APProcessorOptions<ActivityDelete>) { | 14 | async function processDeleteActivity (options: APProcessorOptions<ActivityDelete>) { |
15 | const { activity, byActor } = options | 15 | const { activity, byActor } = options |
diff --git a/server/lib/activitypub/process/process-dislike.ts b/server/lib/activitypub/process/process-dislike.ts index fcdd0b86e..0cd204501 100644 --- a/server/lib/activitypub/process/process-dislike.ts +++ b/server/lib/activitypub/process/process-dislike.ts | |||
@@ -6,8 +6,8 @@ import { AccountVideoRateModel } from '../../../models/account/account-video-rat | |||
6 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' | 6 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' |
7 | import { forwardVideoRelatedActivity } from '../send/utils' | 7 | import { forwardVideoRelatedActivity } from '../send/utils' |
8 | import { getVideoDislikeActivityPubUrl } from '../url' | 8 | import { getVideoDislikeActivityPubUrl } from '../url' |
9 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 9 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
10 | import { MActorSignature } from '../../../typings/models' | 10 | import { MActorSignature } from '../../../types/models' |
11 | 11 | ||
12 | async function processDislikeActivity (options: APProcessorOptions<ActivityCreate | ActivityDislike>) { | 12 | async function processDislikeActivity (options: APProcessorOptions<ActivityCreate | ActivityDislike>) { |
13 | const { activity, byActor } = options | 13 | const { activity, byActor } = options |
diff --git a/server/lib/activitypub/process/process-flag.ts b/server/lib/activitypub/process/process-flag.ts index 7337f337c..8d1c9c869 100644 --- a/server/lib/activitypub/process/process-flag.ts +++ b/server/lib/activitypub/process/process-flag.ts | |||
@@ -7,8 +7,8 @@ import { VideoAbuseModel } from '../../../models/video/video-abuse' | |||
7 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' | 7 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' |
8 | import { Notifier } from '../../notifier' | 8 | import { Notifier } from '../../notifier' |
9 | import { getAPId } from '../../../helpers/activitypub' | 9 | import { getAPId } from '../../../helpers/activitypub' |
10 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 10 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
11 | import { MActorSignature, MVideoAbuseAccountVideo } from '../../../typings/models' | 11 | import { MActorSignature, MVideoAbuseAccountVideo } from '../../../types/models' |
12 | import { AccountModel } from '@server/models/account/account' | 12 | import { AccountModel } from '@server/models/account/account' |
13 | 13 | ||
14 | async function processFlagActivity (options: APProcessorOptions<ActivityCreate | ActivityFlag>) { | 14 | async function processFlagActivity (options: APProcessorOptions<ActivityCreate | ActivityFlag>) { |
diff --git a/server/lib/activitypub/process/process-follow.ts b/server/lib/activitypub/process/process-follow.ts index 950d421dd..7eb7e828d 100644 --- a/server/lib/activitypub/process/process-follow.ts +++ b/server/lib/activitypub/process/process-follow.ts | |||
@@ -8,8 +8,8 @@ import { sendAccept, sendReject } from '../send' | |||
8 | import { Notifier } from '../../notifier' | 8 | import { Notifier } from '../../notifier' |
9 | import { getAPId } from '../../../helpers/activitypub' | 9 | import { getAPId } from '../../../helpers/activitypub' |
10 | import { CONFIG } from '../../../initializers/config' | 10 | import { CONFIG } from '../../../initializers/config' |
11 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 11 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
12 | import { MActorFollowActors, MActorSignature } from '../../../typings/models' | 12 | import { MActorFollowActors, MActorSignature } from '../../../types/models' |
13 | import { autoFollowBackIfNeeded } from '../follow' | 13 | import { autoFollowBackIfNeeded } from '../follow' |
14 | import { getServerActor } from '@server/models/application/application' | 14 | import { getServerActor } from '@server/models/application/application' |
15 | 15 | ||
diff --git a/server/lib/activitypub/process/process-like.ts b/server/lib/activitypub/process/process-like.ts index fba3c76a4..b800a5618 100644 --- a/server/lib/activitypub/process/process-like.ts +++ b/server/lib/activitypub/process/process-like.ts | |||
@@ -6,8 +6,8 @@ import { forwardVideoRelatedActivity } from '../send/utils' | |||
6 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' | 6 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' |
7 | import { getVideoLikeActivityPubUrl } from '../url' | 7 | import { getVideoLikeActivityPubUrl } from '../url' |
8 | import { getAPId } from '../../../helpers/activitypub' | 8 | import { getAPId } from '../../../helpers/activitypub' |
9 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 9 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
10 | import { MActorSignature } from '../../../typings/models' | 10 | import { MActorSignature } from '../../../types/models' |
11 | 11 | ||
12 | async function processLikeActivity (options: APProcessorOptions<ActivityLike>) { | 12 | async function processLikeActivity (options: APProcessorOptions<ActivityLike>) { |
13 | const { activity, byActor } = options | 13 | const { activity, byActor } = options |
diff --git a/server/lib/activitypub/process/process-reject.ts b/server/lib/activitypub/process/process-reject.ts index 9804436a2..03b669fd9 100644 --- a/server/lib/activitypub/process/process-reject.ts +++ b/server/lib/activitypub/process/process-reject.ts | |||
@@ -1,8 +1,8 @@ | |||
1 | import { ActivityReject } from '../../../../shared/models/activitypub/activity' | 1 | import { ActivityReject } from '../../../../shared/models/activitypub/activity' |
2 | import { sequelizeTypescript } from '../../../initializers/database' | 2 | import { sequelizeTypescript } from '../../../initializers/database' |
3 | import { ActorFollowModel } from '../../../models/activitypub/actor-follow' | 3 | import { ActorFollowModel } from '../../../models/activitypub/actor-follow' |
4 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 4 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
5 | import { MActor } from '../../../typings/models' | 5 | import { MActor } from '../../../types/models' |
6 | 6 | ||
7 | async function processRejectActivity (options: APProcessorOptions<ActivityReject>) { | 7 | async function processRejectActivity (options: APProcessorOptions<ActivityReject>) { |
8 | const { byActor: targetActor, inboxActor } = options | 8 | const { byActor: targetActor, inboxActor } = options |
diff --git a/server/lib/activitypub/process/process-undo.ts b/server/lib/activitypub/process/process-undo.ts index 9ef6a8a97..caf672cd6 100644 --- a/server/lib/activitypub/process/process-undo.ts +++ b/server/lib/activitypub/process/process-undo.ts | |||
@@ -10,8 +10,8 @@ import { forwardVideoRelatedActivity } from '../send/utils' | |||
10 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' | 10 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' |
11 | import { VideoShareModel } from '../../../models/video/video-share' | 11 | import { VideoShareModel } from '../../../models/video/video-share' |
12 | import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy' | 12 | import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy' |
13 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 13 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
14 | import { MActorSignature } from '../../../typings/models' | 14 | import { MActorSignature } from '../../../types/models' |
15 | 15 | ||
16 | async function processUndoActivity (options: APProcessorOptions<ActivityUndo>) { | 16 | async function processUndoActivity (options: APProcessorOptions<ActivityUndo>) { |
17 | const { activity, byActor } = options | 17 | const { activity, byActor } = options |
diff --git a/server/lib/activitypub/process/process-update.ts b/server/lib/activitypub/process/process-update.ts index 98ab0f83d..1bdf23d6f 100644 --- a/server/lib/activitypub/process/process-update.ts +++ b/server/lib/activitypub/process/process-update.ts | |||
@@ -14,8 +14,8 @@ import { createOrUpdateCacheFile } from '../cache-file' | |||
14 | import { forwardVideoRelatedActivity } from '../send/utils' | 14 | import { forwardVideoRelatedActivity } from '../send/utils' |
15 | import { PlaylistObject } from '../../../../shared/models/activitypub/objects/playlist-object' | 15 | import { PlaylistObject } from '../../../../shared/models/activitypub/objects/playlist-object' |
16 | import { createOrUpdateVideoPlaylist } from '../playlist' | 16 | import { createOrUpdateVideoPlaylist } from '../playlist' |
17 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 17 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
18 | import { MActorSignature, MAccountIdActor } from '../../../typings/models' | 18 | import { MActorSignature, MAccountIdActor } from '../../../types/models' |
19 | import { isRedundancyAccepted } from '@server/lib/redundancy' | 19 | import { isRedundancyAccepted } from '@server/lib/redundancy' |
20 | 20 | ||
21 | async function processUpdateActivity (options: APProcessorOptions<ActivityUpdate>) { | 21 | async function processUpdateActivity (options: APProcessorOptions<ActivityUpdate>) { |
diff --git a/server/lib/activitypub/process/process-view.ts b/server/lib/activitypub/process/process-view.ts index b3b6c933d..cc26180af 100644 --- a/server/lib/activitypub/process/process-view.ts +++ b/server/lib/activitypub/process/process-view.ts | |||
@@ -2,8 +2,8 @@ import { getOrCreateVideoAndAccountAndChannel } from '../videos' | |||
2 | import { forwardVideoRelatedActivity } from '../send/utils' | 2 | import { forwardVideoRelatedActivity } from '../send/utils' |
3 | import { Redis } from '../../redis' | 3 | import { Redis } from '../../redis' |
4 | import { ActivityCreate, ActivityView, ViewObject } from '../../../../shared/models/activitypub' | 4 | import { ActivityCreate, ActivityView, ViewObject } from '../../../../shared/models/activitypub' |
5 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 5 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
6 | import { MActorSignature } from '../../../typings/models' | 6 | import { MActorSignature } from '../../../types/models' |
7 | 7 | ||
8 | async function processViewActivity (options: APProcessorOptions<ActivityCreate | ActivityView>) { | 8 | async function processViewActivity (options: APProcessorOptions<ActivityCreate | ActivityView>) { |
9 | const { activity, byActor } = options | 9 | const { activity, byActor } = options |
diff --git a/server/lib/activitypub/process/process.ts b/server/lib/activitypub/process/process.ts index c602bf218..e60dd2a5b 100644 --- a/server/lib/activitypub/process/process.ts +++ b/server/lib/activitypub/process/process.ts | |||
@@ -14,8 +14,8 @@ import { getOrCreateActorAndServerAndModel } from '../actor' | |||
14 | import { processDislikeActivity } from './process-dislike' | 14 | import { processDislikeActivity } from './process-dislike' |
15 | import { processFlagActivity } from './process-flag' | 15 | import { processFlagActivity } from './process-flag' |
16 | import { processViewActivity } from './process-view' | 16 | import { processViewActivity } from './process-view' |
17 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 17 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
18 | import { MActorDefault, MActorSignature } from '../../../typings/models' | 18 | import { MActorDefault, MActorSignature } from '../../../types/models' |
19 | 19 | ||
20 | const processActivity: { [ P in ActivityType ]: (options: APProcessorOptions<Activity>) => Promise<any> } = { | 20 | const processActivity: { [ P in ActivityType ]: (options: APProcessorOptions<Activity>) => Promise<any> } = { |
21 | Create: processCreateActivity, | 21 | Create: processCreateActivity, |