]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/misc/utils.ts
Video support field inherits channel support field
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / misc / utils.ts
index 727e339350d6717266a8a424451a488fa88a5d6e..11933e90b48c218494718f7b37706a032a7ccc03 100644 (file)
@@ -17,7 +17,7 @@ function getParameterByName (name: string, url: string) {
   return decodeURIComponent(results[2].replace(/\+/g, ' '))
 }
 
-function populateAsyncUserVideoChannels (authService: AuthService, channel: any[]) {
+function populateAsyncUserVideoChannels (authService: AuthService, channel: { id: number, label: string, support: string }[]) {
   return new Promise(res => {
     authService.userInformationLoaded
       .subscribe(
@@ -28,7 +28,7 @@ function populateAsyncUserVideoChannels (authService: AuthService, channel: any[
           const videoChannels = user.videoChannels
           if (Array.isArray(videoChannels) === false) return
 
-          videoChannels.forEach(c => channel.push({ id: c.id, label: c.displayName }))
+          videoChannels.forEach(c => channel.push({ id: c.id, label: c.displayName, support: c.support }))
 
           return res()
         }