aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-06 13:59:50 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-11-09 15:33:04 +0100
commit3cabf3532b9118a19311f14ca3e171d12d554a2f (patch)
tree46072616df4623d91c87f648e4033b3f1d05d404 /server/lib
parentc8f3cfeba7acc2ab9c5f03161d22856202a49326 (diff)
downloadPeerTube-3cabf3532b9118a19311f14ca3e171d12d554a2f.tar.gz
PeerTube-3cabf3532b9118a19311f14ca3e171d12d554a2f.tar.zst
PeerTube-3cabf3532b9118a19311f14ca3e171d12d554a2f.zip
Add live server hooks
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/live-manager.ts2
-rw-r--r--server/lib/moderation.ts11
2 files changed, 11 insertions, 2 deletions
diff --git a/server/lib/live-manager.ts b/server/lib/live-manager.ts
index 9a2914cc5..ef9377e43 100644
--- a/server/lib/live-manager.ts
+++ b/server/lib/live-manager.ts
@@ -118,7 +118,7 @@ class LiveManager {
118 } 118 }
119 119
120 run () { 120 run () {
121 logger.info('Running RTMP server.') 121 logger.info('Running RTMP server on port %d', config.rtmp.port)
122 122
123 this.rtmpServer = new NodeRtmpServer(config) 123 this.rtmpServer = new NodeRtmpServer(config)
124 this.rtmpServer.run() 124 this.rtmpServer.run()
diff --git a/server/lib/moderation.ts b/server/lib/moderation.ts
index 0ef26d53d..0ace2d021 100644
--- a/server/lib/moderation.ts
+++ b/server/lib/moderation.ts
@@ -20,7 +20,7 @@ import {
20import { ActivityCreate } from '../../shared/models/activitypub' 20import { ActivityCreate } from '../../shared/models/activitypub'
21import { VideoObject } from '../../shared/models/activitypub/objects' 21import { VideoObject } from '../../shared/models/activitypub/objects'
22import { VideoCommentObject } from '../../shared/models/activitypub/objects/video-comment-object' 22import { VideoCommentObject } from '../../shared/models/activitypub/objects/video-comment-object'
23import { VideoCreate, VideoImportCreate } from '../../shared/models/videos' 23import { LiveVideoCreate, VideoCreate, VideoImportCreate } from '../../shared/models/videos'
24import { VideoCommentCreate } from '../../shared/models/videos/video-comment.model' 24import { VideoCommentCreate } from '../../shared/models/videos/video-comment.model'
25import { UserModel } from '../models/account/user' 25import { UserModel } from '../models/account/user'
26import { ActorModel } from '../models/activitypub/actor' 26import { ActorModel } from '../models/activitypub/actor'
@@ -43,6 +43,13 @@ function isLocalVideoAccepted (object: {
43 return { accepted: true } 43 return { accepted: true }
44} 44}
45 45
46function isLocalLiveVideoAccepted (object: {
47 liveVideoBody: LiveVideoCreate
48 user: UserModel
49}): AcceptResult {
50 return { accepted: true }
51}
52
46function isLocalVideoThreadAccepted (_object: { 53function isLocalVideoThreadAccepted (_object: {
47 commentBody: VideoCommentCreate 54 commentBody: VideoCommentCreate
48 video: VideoModel 55 video: VideoModel
@@ -175,6 +182,8 @@ function createAccountAbuse (options: {
175} 182}
176 183
177export { 184export {
185 isLocalLiveVideoAccepted,
186
178 isLocalVideoAccepted, 187 isLocalVideoAccepted,
179 isLocalVideoThreadAccepted, 188 isLocalVideoThreadAccepted,
180 isRemoteVideoAccepted, 189 isRemoteVideoAccepted,