mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 16:42:50 -05:00
abstract context building to overrideable SetContextAsync (#766)
* abstract context building to overrideable SetContextAsync * update method calls
This commit is contained in:
@ -20,7 +20,7 @@ namespace Bit.Notifications
|
||||
public override async Task OnConnectedAsync()
|
||||
{
|
||||
var currentContext = new CurrentContext();
|
||||
currentContext.Build(Context.User, _globalSettings);
|
||||
await currentContext.BuildAsync(Context.User, _globalSettings);
|
||||
if (currentContext.Organizations != null)
|
||||
{
|
||||
foreach (var org in currentContext.Organizations)
|
||||
@ -35,7 +35,7 @@ namespace Bit.Notifications
|
||||
public override async Task OnDisconnectedAsync(Exception exception)
|
||||
{
|
||||
var currentContext = new CurrentContext();
|
||||
currentContext.Build(Context.User, _globalSettings);
|
||||
await currentContext.BuildAsync(Context.User, _globalSettings);
|
||||
if (currentContext.Organizations != null)
|
||||
{
|
||||
foreach (var org in currentContext.Organizations)
|
||||
|
Reference in New Issue
Block a user