]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/core/plugins/plugin.service.ts
Add commentor name alongside fid for video comments
[github/Chocobozzz/PeerTube.git] / client / src / app / core / plugins / plugin.service.ts
index 52ba4215ab380bfd39444ebc45c1b338d773c950..e24468da553f12c653ad6b2a6fa9270df8934355 100644 (file)
@@ -12,6 +12,7 @@ import { ClientHook, ClientHookName, clientHookObject } from '@shared/models/plu
 import { PluginClientScope } from '@shared/models/plugins/plugin-client-scope.type'
 import { RegisterClientHookOptions } from '@shared/models/plugins/register-client-hook.model'
 import { HttpClient } from '@angular/common/http'
+import { AuthService } from '@app/core/auth'
 import { RestExtractor } from '@app/shared/rest'
 import { PluginType } from '@shared/models/plugins/plugin.type'
 import { PublicServerSetting } from '@shared/models/plugins/public-server.setting'
@@ -58,6 +59,7 @@ export class PluginService implements ClientHook {
 
   constructor (
     private router: Router,
+    private authService: AuthService,
     private server: ServerService,
     private zone: NgZone,
     private authHttp: HttpClient,
@@ -266,6 +268,10 @@ export class PluginService implements ClientHook {
                    .toPromise()
       },
 
+      isLoggedIn: () => {
+        return this.authService.isLoggedIn()
+      },
+
       translate: (value: string) => {
         return this.translationsObservable
             .pipe(map(allTranslations => allTranslations[npmName]))