X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-main%2Fusers%2Fuser-notification.service.ts;h=7b9dc34be417e9e09bfd1fceed60e062edf17daf;hb=d573926e9b94fb19c8f51c53f71fc853182e1761;hp=ecc66ecdbb8221c3db89f513640ff5c1a6b23bbe;hpb=594d3e48d8a887bbf48ce4cc594c1c36c9640fb1;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/shared-main/users/user-notification.service.ts b/client/src/app/shared/shared-main/users/user-notification.service.ts index ecc66ecdb..7b9dc34be 100644 --- a/client/src/app/shared/shared-main/users/user-notification.service.ts +++ b/client/src/app/shared/shared-main/users/user-notification.service.ts @@ -1,7 +1,7 @@ import { catchError, map, tap } from 'rxjs/operators' import { HttpClient, HttpParams } from '@angular/common/http' import { Injectable } from '@angular/core' -import { ComponentPaginationLight, RestExtractor, RestService, User, UserNotificationSocket } from '@app/core' +import { ComponentPaginationLight, RestExtractor, RestService, User, UserNotificationSocket, AuthService } from '@app/core' import { ResultList, UserNotification as UserNotificationServer, UserNotificationSetting } from '@shared/models' import { environment } from '../../../../environments/environment' import { UserNotification } from './user-notification.model' @@ -14,6 +14,7 @@ export class UserNotificationService { constructor ( private authHttp: HttpClient, + private auth: AuthService, private restExtractor: RestExtractor, private restService: RestService, private userNotificationSocket: UserNotificationSocket @@ -84,6 +85,6 @@ export class UserNotificationService { } private formatNotification (notification: UserNotificationServer) { - return new UserNotification(notification) + return new UserNotification(notification, this.auth.getUser()) } }