1
0
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:
Kyle Spearrin
2020-06-04 14:14:43 -04:00
committed by GitHub
parent d36c403e6b
commit 4bd3e01a80
3 changed files with 13 additions and 7 deletions

View File

@ -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)