]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/activitypub.ts
Translated using Weblate (Russian)
[github/Chocobozzz/PeerTube.git] / server / helpers / activitypub.ts
index 02a9d40269cd6a7181d922db9854c41c1f5a13b8..08aef29083dbb14a3753cf121b41f6d1c4dae275 100644 (file)
@@ -201,10 +201,12 @@ function checkUrlsSameHost (url1: string, url2: string) {
   return idHost && actorHost && idHost.toLowerCase() === actorHost.toLowerCase()
 }
 
-function buildRemoteVideoBaseUrl (video: MVideoWithHost, path: string) {
+function buildRemoteVideoBaseUrl (video: MVideoWithHost, path: string, scheme?: string) {
+  if (!scheme) scheme = REMOTE_SCHEME.HTTP
+
   const host = video.VideoChannel.Actor.Server.host
 
-  return REMOTE_SCHEME.HTTP + '://' + host + path
+  return scheme + '://' + host + path
 }
 
 // ---------------------------------------------------------------------------