From b815813dba24d02328d425c65df9ef72d85ac5f2 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Mon, 30 Aug 2021 18:19:46 +0200 Subject: [PATCH] Remove providerUserRepository from currentContext in NotificationsHub. (#1549) --- src/Notifications/NotificationsHub.cs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Notifications/NotificationsHub.cs b/src/Notifications/NotificationsHub.cs index 43969d7708..5720cf7b07 100644 --- a/src/Notifications/NotificationsHub.cs +++ b/src/Notifications/NotificationsHub.cs @@ -1,7 +1,6 @@ using System; using System.Threading.Tasks; using Bit.Core.Context; -using Bit.Core.Repositories; using Bit.Core.Settings; using Microsoft.AspNetCore.Authorization; @@ -10,21 +9,18 @@ namespace Bit.Notifications [Authorize("Application")] public class NotificationsHub : Microsoft.AspNetCore.SignalR.Hub { - private readonly IProviderUserRepository _providerUserRepository; private readonly ConnectionCounter _connectionCounter; private readonly GlobalSettings _globalSettings; - public NotificationsHub(IProviderUserRepository providerUserRepository, - ConnectionCounter connectionCounter, GlobalSettings globalSettings) + public NotificationsHub(ConnectionCounter connectionCounter, GlobalSettings globalSettings) { - _providerUserRepository = providerUserRepository; _connectionCounter = connectionCounter; _globalSettings = globalSettings; } public override async Task OnConnectedAsync() { - var currentContext = new CurrentContext(_providerUserRepository); + var currentContext = new CurrentContext(null); await currentContext.BuildAsync(Context.User, _globalSettings); if (currentContext.Organizations != null) { @@ -39,7 +35,7 @@ namespace Bit.Notifications public override async Task OnDisconnectedAsync(Exception exception) { - var currentContext = new CurrentContext(_providerUserRepository); + var currentContext = new CurrentContext(null); await currentContext.BuildAsync(Context.User, _globalSettings); if (currentContext.Organizations != null) {